Skip to content

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 <github@gone.nl>
@thaJeztah thaJeztah self-assigned this Oct 3, 2024
@thaJeztah thaJeztah marked this pull request as draft October 19, 2024 00:02
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