swift-bundler icon indicating copy to clipboard operation
swift-bundler copied to clipboard

unknown or missing subcommand 'swift-bundler' when swiftly is installed

Open kkostov opened this issue 5 months ago • 3 comments

Hi,

I encountered a strange problem after installing the bundler with Mint and it would be really helpful to get a sense of what may be misconfigured / could be going wrong.

Current behaviour

Running swift bundler xxx commands with a space results in an error: unknown or missing subcommand 'swift-bundler'

Running commands with swift-builder xxx works ✅.

Expected behaviour

Running commands with swift bundler xxx also works.

Environment

Apple Swift version 6.1.2 (swift-6.1.2-RELEASE) Target: arm64-apple-macosx15.0

(installed using https://github.com/swiftlang/swiftly)

  • PATH has been updated to include ~/.mint/bin in ~/.zshrc
$ which swift-bundler
/Users/konstantin/.mint/bin/swift-bundler

Notes

At first I suspected it may have something to do with https://github.com/swiftlang/swiftly/issues/283 but the issue persists even after I move the swiftly's sh call to the end of zshrc.

I would appreciate any insight into what may be going wrong on possible ways to troubleshoot. Thank you!

kkostov avatar Jun 16 '25 13:06 kkostov

That’s very interesting. I’ve only ever seen that behaviour on Linux (where running the command with a space never works). Perhaps it’s an issue with the open source toolchains in general? But even if it is, there must be more to the story, because using a space works on Windows.

Can you still reproduce the issue if you remove the swiftly env.sh invocation from your zshrc entirely and replace it with export PATH=/path/to/swiftly/bin:$PATH?

stackotter avatar Jun 16 '25 13:06 stackotter

@stackotter yes!! that fixed it. Thank you!

kkostov avatar Jun 16 '25 13:06 kkostov

Good to know! I wonder what swiftly is doing to break things… I’ll look into it

stackotter avatar Jun 16 '25 13:06 stackotter