`@reached_if` fails for more complex cases
xonixx opened this issue · 0 comments
xonixx commented
@reached_if [[ -f "$TERRAFORM_RC" ]] && awk '/^plugin_cache_dir/{exit(0)}END{exit(1)}' "$TERRAFORM_RC"
error:
bash: -c: line 5: syntax error near unexpected token `('
Looks like the problem is that it passes the awk script argument without the quotes:
[[ -f "$TERRAFORM_RC" ]] && awk /^plugin_cache_dir/{exit(0)}END{exit(1)} "$TERRAFORM_RC"'
Current workaround: use "string"
quoting.