-
Notifications
You must be signed in to change notification settings - Fork 50
Environment variable fixes (redun init and db creds) #123
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
Conversation
@@ -3144,18 +3144,31 @@ def _get_uri_from_secret(secret_name: str) -> str: | |||
def _get_credentialed_uri(base_uri: str, conf: Section) -> str: | |||
parts = urlparse(base_uri) | |||
|
|||
if "@" in parts.netloc: | |||
if parts.password: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before we didn't allow even a username to be passed. Usernames are fine. Instead let's just test for the presence of passwords, which is what we really care about.
args.config = os.path.join(basedir, REDUN_CONFIG_DIR) | ||
|
||
else: | ||
args.config = get_config_dir(args.config) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using get_config_dir()
makes use of all usual ways of discovering the config dir (env var, args, etc).
This is ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fixes #120 and #121