Adjacent symbols and strings considered as two tokens
dundalek opened this issue · 0 comments
dundalek commented
For example a common pattern of passing environmnet variables:
$ env DB_HOSTNAME="localhost" bash -c "echo ${DB_HOSTNAME}"
errors with:
env: ‘localhost’: No such file or directory
This is because adjacent symbol and string is considered as two tokens, so it is the same as:
env DB_HOSTNAME= localhost
A workaround is to wrap the whole thing in quotes, but it is not very nice:
env "DB_HOSTNAME=localhost"