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

Setting additional ENV variables cannot be used with namespaced rake tasks #800

Closed
aliismayilov opened this issue May 13, 2024 · 1 comment

Comments

@aliismayilov
Copy link

Not sure if it's an issue with thor gem parsing the arguments or with kamal, but the following command doesn't work:

$ ./bin/kamal app exec -e 'STATEMENT_TIMEOUT:0' 'bin/rails db:vacuum'
ERROR: "kamal app exec" was called with arguments ["STATEMENT_TIMEOUT=0", "bin/rails db:vacuum"]
Usage: "kamal app exec [CMD]"

While the following work:

$ ./bin/kamal app exec -e 'STATEMENT_TIMEOUT:0' 'bin/rails about'
Get most recent version available as an image...

$ ./bin/kamal app exec 'bin/rails db:vacuum'
Get most recent version available as an image...

Setting additional ENV variables was recently implemented: #751

@djmb
Copy link
Collaborator

djmb commented Jun 4, 2024

The correct format is:

./bin/kamal app exec -e='STATEMENT_TIMEOUT:0' 'bin/rails db:vacuum'

@djmb djmb closed this as completed Jun 4, 2024
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

3 participants
@aliismayilov @djmb and others