Skip to content

[Feature] Feature Request #56

Description

@zaneenders

Is your feature request related to a problem? Please describe.
Printing a Configuration currently displays the following. It would be nice to add public api's to print a runnable unix like command.

let x86_64BuildConfig = Subprocess.Configuration(
      executable: .name("swift"),
      arguments: ["build", "--swift-sdk", "x86_64-swift-linux-musl", "-c", "release"])

print(x86_64BuildConfig.description)
/*
Configuration(
    executable: swift,
    arguments: ["build", "--swift-sdk", "x86_64-swift-linux-musl", "-c", "release"],
    environment: Inherting current environment with updates:
[:],
    workingDirectory: /Users/zane/.scribe/Projects/zane-enders-website,
    platformOptions: PlatformOptions(
        qualityOfService: default,
        userID: nil,
        groupID: nil,
        supplementaryGroups: nil,
        processGroupID: nil,
        createSession: false,
        preSpawnProcessConfigurator: not set
    )
)
*/
// And 
print(x86_64BuildConfig.arguments.description)
// ["build", "--swift-sdk", "x86_64-swift-linux-musl", "-c", "release"]

Describe the solution you'd like
It would be nice to add public print a runnable shell command like the following or modify arguments.description to allow extension to support for this.

print(x86_64BuildConfig.unixCommand)
// swift build --swift-sdk x86_64-swift-linux-musl -c release

like command or api's that allow you to easily to add this extension.
Currently

Describe alternatives you've considered
Using String manipulation apis like below or a Regex alternatives.

.replacingOccurrences(of: ..., with: ...)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions