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

feat: add goose env command #443

Merged
merged 1 commit into from
Jan 19, 2023
Merged

feat: add goose env command #443

merged 1 commit into from
Jan 19, 2023

Conversation

mfridman
Copy link
Collaborator

@mfridman mfridman commented Jan 19, 2023

This PR moves all env config-related bits to an internal cfg package (inspired by the go command), and exposes a new command to see the available and set env variables.

Example from the root of this repo set by direnv:

$ goose env
GOOSE_DRIVER="postgres"
GOOSE_DBSTRING="postgresql://dbuser:password1@localhost:5433/testdb?sslmode=disable"
GOOSE_MIGRATION_DIR="./tests/e2e/testdata/postgres/migrations"
NO_COLOR="false"

And when not set, here are the defaults:

$ goose env
GOOSE_DRIVER=""
GOOSE_DBSTRING=""
GOOSE_MIGRATION_DIR="."
NO_COLOR="false"

Closes #419

@mfridman mfridman merged commit db8fedd into master Jan 19, 2023
@mfridman mfridman deleted the gh-419 branch January 19, 2023 13:35
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

Successfully merging this pull request may close these issues.

Add goose env command to list
1 participant