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 double-quotes to make output more readable #443

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

thaJeztah
Copy link
Member

commit 766b70c quoted these values to prevent globbing, but used single quotes. However, these commands are executed with sh -c using single quotes, which makes the output hard to read because of the embedded quotes being escaped.

This patch changes to use double-quotes, which should still prevent globbing to happen, but make the output more readable.

Before:

CHANNEL=test ./install.sh
...
Adding repo from: https://download.docker.com/linux/centos/docker-ce.repo
+ '[' test '!=' stable ']'
+ sh -c 'dnf config-manager --set-disabled '\''docker-ce-*'\'''
+ sh -c 'dnf config-manager --set-enabled '\''docker-ce-test'\'''
+ sh -c 'dnf makecache'

After:

CHANNEL=test ./install.sh
...
Adding repo from: https://download.docker.com/linux/centos/docker-ce.repo
+ '[' test '!=' stable ']'
+ sh -c 'dnf config-manager --set-disabled "docker-ce-*"'
+ sh -c 'dnf config-manager --set-enabled "docker-ce-test"'
+ sh -c 'dnf makecache'

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

commit 766b70c quoted these values to
prevent globbing, but used single quotes. However, these commands are
executed with `sh -c` using single quotes, which makes the output hard
to read because of the embedded quotes being escaped.

This patch changes to use double-quotes, which should still prevent
globbing to happen, but make the output more readable.

Before:

    CHANNEL=test ./install.sh
    ...
    Adding repo from: https://download.docker.com/linux/centos/docker-ce.repo
    + '[' test '!=' stable ']'
    + sh -c 'dnf config-manager --set-disabled '\''docker-ce-*'\'''
    + sh -c 'dnf config-manager --set-enabled '\''docker-ce-test'\'''
    + sh -c 'dnf makecache'

After:

    CHANNEL=test ./install.sh
    ...
    Adding repo from: https://download.docker.com/linux/centos/docker-ce.repo
    + '[' test '!=' stable ']'
    + sh -c 'dnf config-manager --set-disabled "docker-ce-*"'
    + sh -c 'dnf config-manager --set-enabled "docker-ce-test"'
    + sh -c 'dnf makecache'

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah self-assigned this Sep 12, 2024
@thaJeztah thaJeztah requested a review from a team September 12, 2024 08:35
@thaJeztah thaJeztah merged commit 4bf098d into docker:master Sep 12, 2024
9 checks passed
@thaJeztah thaJeztah deleted the improve_readability branch September 12, 2024 09:40
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