Closed Limess closed 6 years ago
Hi @Limess,
I am sorry but I couldn't reproduce your issue with Serverless 1.27.3. Also, I double-checked my code, and I couldn't find anything that could remove the whitespace. I just take the command strings (as parsed by Serverless) and execute them with execSync
. So I guess the root of the problem might be somewhere else.
Thanks @mvila. Agreed that it doesn't seem related to this plugin - but it's definitely impacted our usage of it across a few projects.
I haven't had time to dig into what is causing this in the main serverless library, will try to if I have the chance.
For reference, the above example is a slight simplification. We're currently using a yaml anchor to share the above command, i.e.:
custom:
deployScript: &deploy_script >
cp -rf public/favicon.ico dist &&
aws s3 sync dist s3://some-url
...
deploy:
finalise: *deploy_script
which worked in the older serverless versions.
Okay, @Limess, I close this issue, but please let me know if you can find an explanation.
Since serverless
1.27.0
, the scripts ran by this plugin have all whitespace removed.i.e.
runs