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

fix: shellcheck warnings in docker run.sh #12377

Merged
merged 4 commits into from
Mar 14, 2022

Conversation

ilyam8
Copy link
Member

@ilyam8 ilyam8 commented Mar 11, 2022

Summary

This PR fixes shellcheck warnings (SC2012) in our docker run.sh file. Thanks to @maneamarius for noticing the problem and suggesting the solution.

Test Plan

Compare the output using the old and new code

$ ls -nd /var/run/docker.sock | awk '{print $4}'
997
$ stat -c %g /var/run/docker.sock 2>/dev/null
997
Additional Information

@ilyam8 ilyam8 changed the title use stat instead of ls fix: shellcheck warnings (SC2012) in docker run.sh Mar 11, 2022
@github-actions github-actions bot added the area/packaging Packaging and operating systems support label Mar 11, 2022
@Ferroin
Copy link
Member

Ferroin commented Mar 11, 2022

@ilyam8 See #12378 for a fix for the CI failure.

@ilyam8
Copy link
Member Author

ilyam8 commented Mar 12, 2022

@Ferroin the problem was exiting after unsuccessful stat. I didn't notice we have set -e 😅

@ilyam8 ilyam8 changed the title fix: shellcheck warnings (SC2012) in docker run.sh fix: shellcheck warnings in docker run.sh Mar 12, 2022
@ilyam8 ilyam8 merged commit 4267a14 into netdata:master Mar 14, 2022
@ilyam8 ilyam8 deleted the fix_SC2012_docker_run branch March 14, 2022 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/packaging Packaging and operating systems support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants