Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error with Swift 5.6 arguments #103

Merged
merged 1 commit into from
Apr 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ enum PackageDescriptionFactory {

private static func readPackageDescription(from folder: URL) throws -> String {
do {
let output = try shellOut(to: "swift", arguments: ["package", "dump-package", "--package-path", "\"\(folder.path)\"" ])
let output = try shellOut(to: "swift", arguments: ["package", "--package-path", "\"\(folder.path)\"", "dump-package" ])
return output
} catch {
let error = error as! ShellOutError // swiftlint:disable:this force_cast
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ struct ResolvedPackage: Decodable {

static func resolveAndLoadResolvedPackage(from folder: URL) throws -> ResolvedPackage {
do {
try shellOut(to: "swift", arguments: ["package", "resolve", "--package-path", "\"\(folder.path)\"" ])
try shellOut(to: "swift", arguments: ["package", "--package-path", "\"\(folder.path)\"", "resolve" ])
} catch {
let error = error as! ShellOutError // swiftlint:disable:this force_cast
throw ResolvedPackageError.resolvingFailed(error.message)
Expand Down
6 changes: 3 additions & 3 deletions Sources/SwiftDependencyUpdaterLibrary/Update.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ enum Update: Equatable {
let packageUpdate = try swiftPackage.performUpdate(self, of: dependency)
print("Updated Package.swift".green)
if packageUpdate {
try shellOut(to: "swift", arguments: ["package", "update", dependency.name, "--package-path", "\"\(folder.path)\"" ])
try shellOut(to: "swift", arguments: ["package", "--package-path", "\"\(folder.path)\"", "update", dependency.name ])
print("Resolved to new version".green)
} else {
try shellOut(to: "swift", arguments: ["package", "update", "resolve", "--package-path", "\"\(folder.path)\"" ])
try shellOut(to: "swift", arguments: ["package", "--package-path", "\"\(folder.path)\"", "update", "resolve", ])
print("Resolved Version".green)
}
case let .withoutChangingRequirements(version):
print("Updating \(dependency.name): \(dependency.resolvedVersion.versionNumberOrRevision) -> \(version)".bold)
try shellOut(to: "swift", arguments: ["package", "update", dependency.name, "--package-path", "\"\(folder.path)\"" ])
try shellOut(to: "swift", arguments: ["package", "--package-path", "\"\(folder.path)\"", "update", dependency.name, ])
print("Resolved to new version".green)
default:
// Do nothing
Expand Down