diff --git a/Sources/ReleaseTools/OptionParser.swift b/Sources/ReleaseTools/OptionParser.swift index e7929d7..2341529 100644 --- a/Sources/ReleaseTools/OptionParser.swift +++ b/Sources/ReleaseTools/OptionParser.swift @@ -155,7 +155,7 @@ class OptionParser { // if we've specified the scheme or user, we also need the workspace if requirements.contains(.workspace) || scheme != nil || user != nil { - if let workspace = defaultWorkspace { + if let workspace = options.workspace ?? defaultWorkspace { self.workspace = workspace } else { throw GeneralError.missingWorkspace diff --git a/Sources/ReleaseTools/RootCommand.swift b/Sources/ReleaseTools/RootCommand.swift index ee6528d..e4d32bc 100644 --- a/Sources/ReleaseTools/RootCommand.swift +++ b/Sources/ReleaseTools/RootCommand.swift @@ -25,6 +25,7 @@ import Runner struct RootCommand: AsyncParsableCommand { static var configuration: CommandConfiguration { CommandConfiguration( + commandName: "rt", abstract: "Assorted tools for iOS/macOS releases.", subcommands: [ AppcastCommand.self, diff --git a/Sources/ReleaseTools/SharedOptions.swift b/Sources/ReleaseTools/SharedOptions.swift index b0dacac..0c06ee3 100644 --- a/Sources/ReleaseTools/SharedOptions.swift +++ b/Sources/ReleaseTools/SharedOptions.swift @@ -64,4 +64,6 @@ struct UpdatesOption: ParsableArguments { struct CommonOptions: ParsableArguments { @Flag(help: "Show the external commands that we're executing, and the output from them.") var showOutput = false @Flag(help: "Show extra logging.") var verbose = false + @Option(help: "The workspace we're operating on.") + var workspace: String? }