Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 of 4 tasks
ilovelinux opened this issue Aug 4, 2023 · 0 comments

Comments

@ilovelinux
Copy link

I'm submitting a...

  • Bug report
  • Feature request
  • Documentation issue or request
  • Other... Please describe:

Code

const passingArguments = process.argv.slice(4).join(' ');
await execAsync('serverless deploy ' + passingArguments, { cwd: this.$cli.projectPath });

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

  • Jovo CLI version used: 4.1.9
  • Jovo Target-Serverless: 4.1.8
  • Operating System: Mac (sadly)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant