codeskyblue / codeskyblue/go-sh
How use and operator?
- Dominant language
- Go
- Stars
- 1.1k
- Forks
- 137
- PR merge metrics
- No merged PRs in 30d
Description
Hello!
I have question.
I have this code:
```
session := sh.NewSession()
session.SetTimeout(time.Second * 30)
session.ShowCMD = true
session.SetDir(repositoryPath)
session.Command(
"rm", "-f", archiveFile, "&&",
"git", "archive", branchName, "--format", "tar", "--output", archiveFile,
)
```
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?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the Session.Command entry point and its handling of the arguments shown in the issue. Reproduce the rm and git archive invocation while comparing the debug output with actual execution. Done means the behavior of the && argument is established and the supported usage or required change is clearly documented or tested.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, shell
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100