mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-10-31 22:51:22 +00:00
nixos ec2/create-amis.sh: shellcheck: read without -r mangles backslashes
This commit is contained in:
parent
baf7ed3f24
commit
a66a22ca54
@ -111,7 +111,7 @@ wait_for_import() {
|
|||||||
local state snapshot_id
|
local state snapshot_id
|
||||||
log "Waiting for import task $task_id to be completed"
|
log "Waiting for import task $task_id to be completed"
|
||||||
while true; do
|
while true; do
|
||||||
read state progress snapshot_id < <(
|
read -r state progress snapshot_id < <(
|
||||||
aws ec2 describe-import-snapshot-tasks --region "$region" --import-task-ids "$task_id" | \
|
aws ec2 describe-import-snapshot-tasks --region "$region" --import-task-ids "$task_id" | \
|
||||||
jq -r '.ImportSnapshotTasks[].SnapshotTaskDetail | "\(.Status) \(.Progress) \(.SnapshotId)"'
|
jq -r '.ImportSnapshotTasks[].SnapshotTaskDetail | "\(.Status) \(.Progress) \(.SnapshotId)"'
|
||||||
)
|
)
|
||||||
@ -139,7 +139,7 @@ wait_for_image() {
|
|||||||
log "Waiting for image $ami_id to be available"
|
log "Waiting for image $ami_id to be available"
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
read state < <(
|
read -r state < <(
|
||||||
aws ec2 describe-images --image-ids "$ami_id" --region "$region" | \
|
aws ec2 describe-images --image-ids "$ami_id" --region "$region" | \
|
||||||
jq -r ".Images[].State"
|
jq -r ".Images[].State"
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user