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

Use /usr/bin/test command instead of shell evaluation #925

Merged
merged 1 commit into from
Aug 12, 2024

Conversation

mwperina
Copy link
Member

Replace direct shell evaluation with /usr/bin/test command to bypass
confusing output in logs:

shell evaluation output:

  Executed command '[ -f /etc/bluechi/controller.conf.d/ctrl.conf ] && echo 'exists'' with result '2' and output '[: missing ']''

/usr/bin/test command output:

  Executed command '/usr/bin/test -f /etc/bluechi/controller.conf.d/ctrl.conf' with result '1' and output 'b'''

Signed-off-by: Martin Perina mperina@redhat.com

Replace direct shell evaluation with `/usr/bin/test` command to bypass
confusing output in logs:

shell evaluation output:
```
  Executed command '[ -f /etc/bluechi/controller.conf.d/ctrl.conf ] && echo 'exists'' with result '2' and output '[: missing ']''
```

/usr/bin/test command output:
```
  Executed command '/usr/bin/test -f /etc/bluechi/controller.conf.d/ctrl.conf' with result '1' and output 'b'''
```

Signed-off-by: Martin Perina <mperina@redhat.com>
@coveralls
Copy link

Coverage Status

coverage: 84.717% (+0.03%) from 84.683%
when pulling dae822d on mwperina:fix-bash-eval-in-tests
into 2e8d273 on eclipse-bluechi:main.

Copy link
Member

@engelmi engelmi left a comment

Choose a reason for hiding this comment

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

LGTM

@engelmi engelmi merged commit de46dbd into eclipse-bluechi:main Aug 12, 2024
22 checks passed
@mwperina mwperina deleted the fix-bash-eval-in-tests branch August 12, 2024 14:22
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

Successfully merging this pull request may close these issues.

3 participants