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

Go run shell commands #41

Closed
4 tasks done
at15 opened this issue Jul 8, 2016 · 1 comment
Closed
4 tasks done

Go run shell commands #41

at15 opened this issue Jul 8, 2016 · 1 comment
Labels

Comments

@at15
Copy link
Member

at15 commented Jul 8, 2016

For #7 we have the following requirements

  • user write their test script as string, ie: go test .
  • show the output and get exit status

Current problems are

  • os/exec require name, arg1, arg2, .... while user input is string
  • os/exec seems can not handle situation like go test -v -cover $(glide novendor)
  • use sh -c "command here" via os/exec seems not working
  • have a minimal sample and ask question on so

Some CI written in golang could an example

at15 added a commit that referenced this issue Jul 8, 2016
$(glide novendor) is just handled as simple string

Issues #41 #7
at15 added a commit that referenced this issue Jul 8, 2016
By passing the test command using native exec.Command, the test can run.
Though there is a compile error for two main package in same folder

Issues #41 #7
at15 added a commit that referenced this issue Jul 8, 2016
- use shell quote to split
- use sh -c to execute
@at15 at15 closed this as completed in #42 Jul 8, 2016
@at15
Copy link
Member Author

at15 commented Jul 8, 2016

split the string like shell does is the main problem. cc @gaocegege

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

No branches or pull requests

1 participant