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

quote some variables, and use double-quotes for more readable output #449

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thaJeztah
Copy link
Member

I noticed some variables weren't quoted but included parts that could be set through environment variables.

Add quotes to those to prevent possible issues, and use double quotes to make the output more readable, similar to what was done in commit 65cca2f

Before:

+ TMP_REPO_FILE=/tmp/tmp.gg8DOiskXT
+ sh -c 'curl -fsSL '\''https://download.docker.com/linux/fedora/docker-ce.repo'\'' | tr -s '\''\n'\'' > '\''/tmp/tmp.gg8DOiskXT'\'''
+ sh -c 'dnf5 config-manager addrepo --save-filename=docker-ce.repo --overwrite --from-repofile='\''/tmp/tmp.gg8DOiskXT'\'''
+ sh -c 'rm -f '\''/tmp/tmp.gg8DOiskXT'\'''

After:

+ TMP_REPO_FILE=/tmp/tmp.C89hwiQBFk
+ sh -c 'curl -fsSL "https://download.docker.com/linux/fedora/docker-ce.repo" | tr -s "\n" > "/tmp/tmp.C89hwiQBFk"'
+ sh -c 'dnf5 config-manager addrepo --save-filename=docker-ce.repo --overwrite --from-repofile="/tmp/tmp.C89hwiQBFk"'
+ sh -c 'rm -f "/tmp/tmp.C89hwiQBFk"'

I noticed some variables weren't quoted but included parts that could
be set through environment variables.

Add quotes to those to prevent possible issues, and use double quotes
to make the output more readable, similar to what was done in commit
65cca2f

Before:

    + TMP_REPO_FILE=/tmp/tmp.gg8DOiskXT
    + sh -c 'curl -fsSL '\''https://download.docker.com/linux/fedora/docker-ce.repo'\'' | tr -s '\''\n'\'' > '\''/tmp/tmp.gg8DOiskXT'\'''
    + sh -c 'dnf5 config-manager addrepo --save-filename=docker-ce.repo --overwrite --from-repofile='\''/tmp/tmp.gg8DOiskXT'\'''
    + sh -c 'rm -f '\''/tmp/tmp.gg8DOiskXT'\'''

After:

    + TMP_REPO_FILE=/tmp/tmp.C89hwiQBFk
    + sh -c 'curl -fsSL "https://download.docker.com/linux/fedora/docker-ce.repo" | tr -s "\n" > "/tmp/tmp.C89hwiQBFk"'
    + sh -c 'dnf5 config-manager addrepo --save-filename=docker-ce.repo --overwrite --from-repofile="/tmp/tmp.C89hwiQBFk"'
    + sh -c 'rm -f "/tmp/tmp.C89hwiQBFk"'

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah self-assigned this Oct 3, 2024
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.

1 participant