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

Enable capturing of stdout/stderror #86

Open
lowell80 opened this issue Apr 7, 2021 · 0 comments
Open

Enable capturing of stdout/stderror #86

lowell80 opened this issue Apr 7, 2021 · 0 comments

Comments

@lowell80
Copy link
Member

lowell80 commented Apr 7, 2021

Describe the solution you'd like

The builder.Step.run() function should support passing back values from stdout/stderror where possible. Maybe this could be a new function that supports capturing output, but currently nothing is returned by run().

Describe alternatives you've considered

Could call subprocess.Process() directly, but that seems counter-productive.

Example use case

Attempting to translate the following from my build script:

# Get commit time of savedsearches.conf (last time it changed; any stanza) and use that as the modtime
ss_mtime=$(git log -n 1 --pretty=format:%ct -- $APP/default/savedsearches.conf)
echo -e "[savedsearches/my_important_savedsearch]\n#Last change in git\nmodtime = $ss_mtime\n" >> "$BUILD/metadata/default.meta"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant