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

Fixes #18512: variable from command does not always report an error when the command failed #1260

Conversation

Fdall
Copy link
Contributor

@Fdall Fdall commented Nov 5, 2020

@Fdall Fdall requested a review from amousset November 5, 2020 15:36
@Fdall Fdall force-pushed the bug_18512/variable_from_command_does_not_always_report_an_error_when_the_command_failed branch from f523abe to df1add3 Compare November 5, 2020 16:54
@Fdall
Copy link
Contributor Author

Fdall commented Nov 5, 2020

Commit modified

@Fdall Fdall force-pushed the bug_18512/variable_from_command_does_not_always_report_an_error_when_the_command_failed branch from df1add3 to ed1e212 Compare November 5, 2020 16:57
@Fdall
Copy link
Contributor Author

Fdall commented Nov 5, 2020

Commit modified

@@ -53,12 +53,12 @@ bundle agent variable_string_from_command(variable_prefix, variable_name, comman
# for example when checking promises on the server.
pass1::
# the cariage return is necessary if command ends by a comment
"temp" string => execresult("OUTPUT=${const.dollar}(/bin/true; ${command}
"temp" string => execresult("OUTPUT=${const.dollar}(/bin/true; 2>/dev/null ${command}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are you hiding errors ?

@Normation-Quality-Assistant
Copy link
Contributor

OK, merging this PR

@Normation-Quality-Assistant Normation-Quality-Assistant merged commit caa3240 into Normation:branches/rudder/6.1 Nov 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants