Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ curl -L https://github.com/mikefarah/yq/releases/download/3.3.0/yq_linux_amd64 -
CONFIG="${SHARED_DIR}/install-config.yaml"
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')
Copy link
Contributor

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

Copy link
Member Author

@wking wking Jul 8, 2020

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']


subnets="[]"
case "${aws_region}_$((RANDOM % 4))" in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ curl -L https://github.com/mikefarah/yq/releases/download/3.3.0/yq_linux_amd64 -
CONFIG="${SHARED_DIR}/install-config.yaml"
PATCH="${SHARED_DIR}/install-config-sharednetwork.yaml.patch"

azure_region=$(/tmp/yq r ${CONFIG} 'platform.azure.region')
azure_region=$(/tmp/yq r "${CONFIG}" 'platform.azure.region')

cat >> "${PATCH}" << EOF
platform:
Expand Down