-
Notifications
You must be signed in to change notification settings - Fork 140
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
How use and operator? #20
Comments
No. & is not allowed by go-sh |
@codeskyblue Maybe add new command like: |
pr welcome |
This is very old, but maybe it will help someone and get this issue closed. Here's a way to use a
#!/bin/bash
archive_file=$1
branch=$2
rm -f ${archive_file} && git archive ${branch} --format tar --output ${archive_file} session := sh.NewSession()
session.SetTimeout(time.Second * 30)
session.ShowCMD = true
session.SetDir(repositoryPath)
session.Command(
"./my_script.sh", archiveFile, branchName
) |
"rm -f" never returns error... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello!
I have question.
I have this code:
And debug message:
[golang-sh]$ rm -f /tmp/archive.tar && git archive origin/master --format tar --output /tmp/archive.tar
But second command not executed...
If i remove
"rm", "-f", archiveFile, "&&",
Its work, but i need this "&&" operator.
What mistake?
The text was updated successfully, but these errors were encountered: