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

wrench use environment variables instead of command arguments #70

Open
ryoheinagao opened this issue Jan 11, 2023 · 0 comments
Open

wrench use environment variables instead of command arguments #70

ryoheinagao opened this issue Jan 11, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@ryoheinagao
Copy link

Expected Behavior

When specifying project, instance and database by command line args, I want wrench to use the values instead of environment variables.

Current Behavior

wrench use environment variables even if I pass project, instance and database by the command line args.

Steps to Reproduce

$ echo $SPANNER_PROJECT_ID                                                                                                                              
project-local-emulator

$ wrench apply --project my-gcp-project --instance instance1 --database database1 --dml ./sql/dml/000001_init.sql

Error command: apply, version: unknown
        Failed to execute the operation to Cloud Spanner, context deadline exceeded

$ unset SPANNER_PROJECT_ID                                                                                                               
$ echo $SPANNER_PROJECT_ID                                                                                                                              

$ wrench apply --project my-gcp-project --instance instance1 --database database1 --dml ./sql/dml/000001_init.sql
1 rows affected.

Context (Environment)

  • wrench version: 1.3.0

wrench help says project, instance and database can be specified by command line args. For example, in the description of the arg for database, (optional. if not set, will use $SPANNER_DATABASE_ID value) seems to mean command line args have higher priority than environment variables.

@ryoheinagao ryoheinagao added the bug Something isn't working label Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant