Cannot use tf-output with Serverless 3
Opened this issue · 1 comments
Hi there,
After updating from Serverless 2 to Serverless 3, I've found that there's an issue with running tf-output and then serverless. Due to a breaking change added in between Serverless 2 and 3, Serverless no longer accepts free-form CLI options, so those need to be replaced by --param <var>=<value>
instead, however tf-output does not deal with this well.
For example, the following code:
npm run tfoutput -- --region=us-east-1 --dataStage=dev -- sls deploy --param env=local --stage test --region us-east-1
Should run sls deploy --param env=local --stage test --region us-east-1
after running tf-output, but instead runs sls deploy --param env\=local --stage test --region us-east-1
, which causes the env
param to not be registered. Which I've figured out is because of the quote function from the node-shell-quote dependency, which adds \
so that env=dev
becomes env\=dev
, which causes the parameter's name to be set to env\
.
There is no issue when running command in linux. However the problem with escaped =
sign persists when running on Windows 10, in git bash or cmd