Skip to content

Commit a16a934

Browse files
authored
Improve Package.swift not found diagnostic error SR-14829 (#3601)
* Make Package.swift not found error more descriptive SR-14829
1 parent d7fba6c commit a16a934

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Sources/Commands/Error.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ extension Error: CustomStringConvertible {
3030
case .invalidToolchain(let problem):
3131
return problem
3232
case .rootManifestFileNotFound:
33-
return "root manifest not found"
33+
return "Could not find \(Manifest.filename) in this directory or any of its parent directories."
3434
}
3535
}
3636
}

Tests/CommandsTests/PackageToolTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1062,7 +1062,7 @@ final class PackageToolTests: XCTestCase {
10621062
XCTAssertEqual(result.exitStatus, .terminated(code: 1))
10631063

10641064
let stderrOutput = try result.utf8stderrOutput()
1065-
XCTAssert(stderrOutput.contains("error: root manifest not found"), #"actual: "\#(stderrOutput)""#)
1065+
XCTAssert(stderrOutput.contains("error: Could not find Package.swift in this directory or any of its parent directories."), #"actual: "\#(stderrOutput)""#)
10661066
}
10671067

10681068
// Runnning with output as absolute path to existing directory

0 commit comments

Comments
 (0)