You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#!/bin/bash
if ! lxc launch --vm "$image" "$name" <<EOF
${instance_config}
EOF
then
lxc delete -f "$name"
fi
After:
#!/bin/bash
if ! lxc launch --vm "$image" "$name" <<EOF; then
${instance_config}
EOF
lxc delete -f "$name"
fi
It breaks the script and modifies the heredoc content. It should not move the then and keep it on his own line without prepended ;.
Note: Putting the command into the if is recommended by SC2181. Obviously <<<"${instance_config}" can be used but the issue is still present when using heredoc.
The text was updated successfully, but these errors were encountered:
shfmt v3.6.0
Before:
After:
It breaks the script and modifies the heredoc content. It should not move the
then
and keep it on his own line without prepended;
.Note: Putting the command into the if is recommended by SC2181. Obviously
<<<"${instance_config}"
can be used but the issue is still present when using heredoc.The text was updated successfully, but these errors were encountered: