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

special character '>' #102

Open
2013kaa opened this issue Feb 12, 2024 · 1 comment
Open

special character '>' #102

2013kaa opened this issue Feb 12, 2024 · 1 comment

Comments

@2013kaa
Copy link

2013kaa commented Feb 12, 2024

Hello
I have a command to build gradle like: ./gradlew build final dependencies > dep.txt

but when executed through cmd.NewCmdOptions it gives an error when building in the Gradle: Task '>' not found in root project 'xxxx'.

tell me how to solve the problem?there may be some kind of special character escaping >

@daniel-nichter
Copy link
Member

> is output redirection, not part of the command. So use Options to set streaming or buffered output (and to combine STDOUT or STDERR or not). If you choose streaming output, you'd read Cmd.Stdout (and/or .Stderr) channels and write them to a file. If you choose buffered output, you'd copy Status.Stdout (and/or .Stderr) to file.

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