xonixx / makesure

Simple task/command runner with declarative goals and dependencies
https://makesure.dev
MIT License
344 stars 5 forks source link

`@reached_if` fails for more complex cases #113

Closed xonixx closed 1 year ago

xonixx commented 2 years ago
@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.