-
Notifications
You must be signed in to change notification settings - Fork 2k
ci-operator/step-registry/ipi/conf/*/sharednetwork: Quote CONFIG #10105
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
ci-operator/step-registry/ipi/conf/*/sharednetwork: Quote CONFIG #10105
Conversation
To make ShellCheck happy, addressing:
$ sudo podman run --rm --volume "${PWD}:/workdir:ro,z" --workdir /workdir registry.svc.ci.openshift.org/ci/shellcheck sh -c 'find ci-operator/step-registry/ipi -name "*.sh" -print0 | xargs -0 -n1 shellcheck'
In ci-operator/step-registry/ipi/conf/aws/sharednetwork/ipi-conf-aws-sharednetwork-commands.sh line 13:
aws_region=$(/tmp/yq r ${CONFIG} 'platform.aws.region')
^-------^ SC2086: Double quote to prevent globbing and word splitting.
Did you mean:
aws_region=$(/tmp/yq r "${CONFIG}" 'platform.aws.region')
For more information:
https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...
In ci-operator/step-registry/ipi/conf/azure/sharednetwork/ipi-conf-azure-sharednetwork-commands.sh line 13:
azure_region=$(/tmp/yq r ${CONFIG} 'platform.azure.region')
^-------^ SC2086: Double quote to prevent globbing and word splitting.
Did you mean:
azure_region=$(/tmp/yq r "${CONFIG}" 'platform.azure.region')
For more information:
https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...
abhinavdahiya
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
| PATCH="${SHARED_DIR}/install-config-sharednetwork.yaml.patch" | ||
|
|
||
| aws_region=$(/tmp/yq r ${CONFIG} 'platform.aws.region') | ||
| aws_region=$(/tmp/yq r "${CONFIG}" 'platform.aws.region') |
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.
https://github.com/openshift/release/pull/10105/files#diff-27605b7c8f643fa9b7d430f76604ebe6R10 is already quotes CONFIG, why do we need to quote again ??
this shellcheck warnings is just too noisy imo
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.
The earlier quotes affect word splitting on that line. These quotes affect splitting on this line. For example:
$ A='b c'
$ B="${A}"
$ python -c 'import sys; print(sys.argv)' ${B}
['-c', 'b', 'c']
$ python -c 'import sys; print(sys.argv)' "${B}"
['-c', 'b c']|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abhinavdahiya, wking The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@wking: Updated the following 2 configmaps:
DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
To make ShellCheck happy, addressing:
More groundwork for #9772.