jovotech / jovo-cli

🛠 Command Line Interface for the Jovo Framework: Makes voice experience deployment a breeze, including features like local development and staging.
https://www.jovo.tech/marketplace/jovo-cli
Apache License 2.0
57 stars 31 forks source link

[BUG] Serverless deploy doesn't support parameters before "serverless", no explicit error/warnings about it #358

Open ilovelinux opened 1 year ago

ilovelinux commented 1 year ago

I'm submitting a...

Code

https://github.com/jovotech/jovo-cli/blob/065df275bbc1cbcf9f22e4795e1de96cf279cb57/integrations/target-serverless/src/hooks/DeployHook.ts#L68-L69

Expected Behavior

Running jovo deploy:code --stage prod serverless --debug should give an explicit error. We could check if process.argv[3] == "serverless" and if it's not, raise the error.

Something like that:

$ jovo deploy:code --stage prod serverless --debug
Please run jovo deploy:code serverless <parameters>, we don't support parameters before "serverless"

Current Behavior

Running jovo deploy:code --stage prod serverless --debug will execute serverless deploy prod serverless --debug which is not a supported syntax by serverless.

Solutions

Error log

$ jovo deploy:code --stage prod serverless --debug

jovo deploy:code: Upload the source code to a cloud provider
  >> Learn more: https://jovo.tech/docs/deploy-command#deploy-code

✔ 📦 Bundling your code
✖ 🚀 Deploying to Serverless

x Error: --------------------------------------------------------------------------------
›                                                                                 
› Message:
›  Serverless deployment failed.
›                                                                                 
› Module:
›  ServerlessCli
›                                                                                 
›                                                                                 
› If you think this is not on you, you can submit an issue here: https://github.com/jovotech/jovo-cli/issues.

Your Environment