Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Should output.TotalWritten be judged after cmd.Wait() is executed? #1319

Closed
cobolbaby opened this issue Apr 18, 2023 · 1 comment · Fixed by #1389
Closed

Should output.TotalWritten be judged after cmd.Wait() is executed? #1319

cobolbaby opened this issue Apr 18, 2023 · 1 comment · Fixed by #1389
Labels

Comments

@cobolbaby
Copy link
Contributor

// Warn if buffer is overwritten
if output.TotalWritten() > output.Size() {
log.Printf("shell: Script '%s' generated %d bytes of output, truncated to %d", command, output.TotalWritten(), output.Size())
}
err = cmd.Wait()

Should output.TotalWritten be judged after cmd.Wait() is executed?

@vcastellm
Copy link
Member

Yes, it makes sense.

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

Successfully merging a pull request may close this issue.

2 participants