-
Notifications
You must be signed in to change notification settings - Fork 914
chore: ban echo command #806
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
Conversation
d0ab6a4 to
0351964
Compare
0351964 to
2413dab
Compare
| printf "%s:\\n%s\\n\\n" "SHELL" "$($SHELL --version)" | ||
| printf "%s:\\n%s\\n\\n" "ASDF VERSION" "$(asdf_version)" | ||
| printf "%s:\\n%s\\n\\n" "ASDF ENVIRONMENT VARIABLES" "$(env | grep -E "ASDF_DIR|ASDF_DATA_DIR|ASDF_CONFIG_FILE|ASDF_DEFAULT_TOOL_VERSIONS_FILENAME")" | ||
| printf "%s:\\n%s\\n\\n" "ASDF INSTALLED PLUGINS" "$(asdf plugin list --urls)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ShellCheck recommends \\n for double quoted strings.
jthegedus
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
As a general point of discussion, what are your thoughts on:
|
Either way is fine with me. Assuming the format string doesn't contain anything that would be interpreted as special characters by
If a pattern is repeated in several places, it may make sense to encapsulate the print in a function. Something like: Although I think in cases like this is it overkill (format string is just item, space, item, newline). |
|
I disagree on 2 as too often I see the function gets co-opted to do more work and often moved further out of context into another file which exacerbates the problem. Thanks for the food for thought 👍 |
With the help of BellLabs (bell-sw/Liberica#42) we now also have Liberica macOS integration support. It doesn't work for all versions we can install, so it logs a warning in case it's not possible to use their "trick". For this to work we depend on @joschi java-metadata project. This project provides the shasum (and with that the check if the .pkg version exists). Other things done: - Fail if commands fail - Fixed unzip check - All error messages go to stderr - Aligned indent to 4 spaces - Removed all echo's in favor of printf in line with asdf-vm/asdf#806 - Use the bash [[ conditions
With the help of BellLabs (bell-sw/Liberica#42) we now also have Liberica macOS integration support. It doesn't work for all versions we can install, so it logs a warning in case it's not possible to use their "trick". For this to work we depend on @joschi java-metadata project. This project provides the shasum (and with that the check if the .pkg version exists). Other things done: - Fail if commands fail - Fixed unzip check - All error messages go to stderr - Aligned indent to 4 spaces - Removed all echo's in favor of printf in line with asdf-vm/asdf#806 - Use the bash [[ conditions
Summary
echoto list of banned commands.echocalls with calls toprintf.printfcalls that were generating ShellCheck warnings.Fixes: #781