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

make config file not required #47

Merged
merged 4 commits into from
Apr 4, 2024
Merged

Conversation

joao-zanutto
Copy link
Contributor

No description provided.

Copy link
Contributor

@wwoytenko wwoytenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked that when you try to set the env vars with AutomaticEnv if they are not presented in the config then the config attribute value won't be gathered from the env vars.

For example:

$ COMMON_PG_BIN_PATH='/opt/homebrew/Cellar/postgresql@16/16.1_3/bin' ./greenmask dump                 
2024-04-02T12:14:22+02:00 INF stderr forwarding Executable=pg_dump Stderr="pg_dump: error: server version: 16.1 (Debian 16.1-1.pgdg120+1); pg_dump version: 14.9 (Homebrew)"
2024-04-02T12:14:22+02:00 INF stderr forwarding Executable=pg_dump Stderr="pg_dump: error: aborting because of server version mismatch"
2024-04-02T12:14:22+02:00 FTL cannot make a backup error="schema only stage dumping error: cannot execute command: exit status 1"

Consider adding the possibility to set the config attributes (at least temp dir and pg_bin_path) via env vars.

cmd/greenmask/cmd/root.go Outdated Show resolved Hide resolved
Copy link
Contributor

@wwoytenko wwoytenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wwoytenko wwoytenko merged commit d4ca706 into GreenmaskIO:main Apr 4, 2024
15 checks passed
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.

None yet

2 participants