Skip to content

Commit 9baf376

Browse files
committed
improve ScriptingCore
1 parent 3a7490b commit 9baf376

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/ScriptingCore/Models.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public struct PackageModel: Codable {
2020
let path: AbsolutePath?
2121
/// The URL of a remote package.
2222
let url: Foundation.URL?
23-
/// The user-defined name for a local package.
23+
/// The user-defined name for a package.
2424
private let _name: String?
2525

2626
/// The resolved name of the package.
@@ -34,7 +34,7 @@ public struct PackageModel: Codable {
3434
} else if let url = url {
3535
name = url.pathComponents.last!.spm_dropGitSuffix()
3636
} else {
37-
fatalError()
37+
preconditionFailure("Invalid package model")
3838
}
3939
return name
4040
}

0 commit comments

Comments
 (0)