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
Commander doesn't... parse arguments? #11
Comments
Hi @Danappelxx, I had a quick look into this, and it seems that there is a bug in Cato where it's not passing the arguments into the tool correctly. /cc @neonichu Here is the expected output: $ chmod +x bin/test
$ ./bin/test
Usage:
$ ./bin/test
Commands:
+ init
$ ./bin/test init
Missing argument
$ ./bin/test init x
Initialising x May I suggest you try using CocoaPods-Rome instead for now until this is figured out. Your script would look something like: #!/usr/bin/env xcrun swift -F Rome
import Commander
Group {
$0.command("init") { (name: String) in
print("Initializing \(name)")
}
}.run() Where the told line references the platform :osx, '10.10'
use_frameworks!
plugin 'cocoapods-rome'
pod 'Commander' Then you can simply run I am working to simplify this process with a build tool and I'll add more about that once it's ready to use. |
😱 |
Thanks! I'll look into it. By the way, have you discovered any workarounds that allow you to use Commander (or any framework, really) in Xcode cli projects? Putting it in /library/frameworks didn't do the trick for me for some reason. Cato would work by just moving it to |
Closing this issue since it's not a problem in Commander but cato. As for your question, I'm not entirely sure about Xcode projects. I use Xcode anymore, but instead Conche. With Rome, that's fine, you just need to ensure the Frameworks when you install are in the applications path. As you can see in querykit cli it will copy to Frameworks from Rome in installation and then add Frameworks to the rpath. cp -fr "Rome/" "$(DESTDIR)/Frameworks/"
install_name_tool -add_rpath "@executable_path/../Frameworks/" "$(DESTDIR)/bin/querykit" |
With the following swift file called
main
:As expected, running:
results in
Which is great! However, when I run the following command, I get the same result:
instead of the expected:
Is this an error on my part or is it broken?
By the way, I'm on OS X El Capitan running Xcode 7.1 Beta 2, if it matters.
The text was updated successfully, but these errors were encountered: