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

Log purging goes to stdout breaking scripts #604

Closed
findepi opened this issue Feb 25, 2022 · 2 comments
Closed

Log purging goes to stdout breaking scripts #604

findepi opened this issue Feb 25, 2022 · 2 comments

Comments

@findepi
Copy link
Contributor

findepi commented Feb 25, 2022

Following #513 (comment), i use mvnd in a script like this

project_version=$(mvnd -B help:evaluate -Dexpression=pom.version -q -DforceStdout --raw-streams)

This breaks, however, if mvnd decides to purge logs.
The variable ends up containing a value like:

372-SNAPSHOT
Purged 18 log files (log available in /Users/findepi/.m2/mvnd/registry/0.7.1/purge-2022-02-25.log)
findepi added a commit to findepi/trino that referenced this issue Mar 21, 2022
findepi added a commit to trinodb/trino that referenced this issue Mar 22, 2022
gnodet added a commit to gnodet/mvnd that referenced this issue Apr 12, 2022
@gnodet
Copy link
Contributor

gnodet commented Apr 12, 2022

@findepi #617 prints the message to the error stream so that you could redirect it to /dev/null without having to disable purge. Would that work for you ?

@findepi
Copy link
Contributor Author

findepi commented Apr 12, 2022

@gnodet the stderr would do, thanks!
(in my case, i don't even need to redirect it to /dev/null, it simply won't become of shell's variable value)

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