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

--raw-command does not launch with an interpreter on Windows #451

Open
KyleSanderson opened this issue Nov 9, 2024 · 1 comment
Open

Comments

@KyleSanderson
Copy link

Thank you very much for this application 😺 .

Right now there doesn't seem to be a way to pass args to a windows bash shell. When calling my script with how exec presently works Windows returns that my script isn't a valid win32 application (which it's right).

STR is fairly clean, just go run gotest.tools/gotestsum@latest --junitfile unit-tests.xml --format pkgname --raw-command ./profile.sh -- ./... on Windows.

Using something like https://github.com/mattn/go-shellwords may be helpful for parsing these strings into commands with args and similar. Wrapping the run with bash -c profile.sh invokes okay, but the args don't make it through.

@dnephin
Copy link
Member

dnephin commented Feb 8, 2025

Thanks for the issue! There shouldn't be any need to parse the args because they are already parsed by the shell before being handled to gotestsum.

I would expect something like this to work:

go run gotest.tools/gotestsum@latest --junitfile unit-tests.xml --format pkgname --raw-command bash ./profile.sh -- ./...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants