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

Fix config.port and config.bind #146

Merged
merged 4 commits into from
Mar 9, 2023
Merged

Fix config.port and config.bind #146

merged 4 commits into from
Mar 9, 2023

Conversation

DannyBen
Copy link
Owner

@DannyBen DannyBen commented Mar 9, 2023

Fixes #145


Since the command line refactoring in 1.0.0, both --port and --bind were defined like this:

option '-p --port NUMBER', 'Set server port number [default: 3000]'

which meant that when we reached the config merge function here

def override_config(args)
config.path = args['PATH'] if args['PATH']
config.port = args['--port'].to_i if args['--port']
config.bind = args['--bind'] if args['--bind']

there was always a value in the command line arguments, which always shadows the config argument.

Replacing the square brackets with standard parentheses prevents this from happening.

@DannyBen DannyBen merged commit 7a7d7a5 into master Mar 9, 2023
@DannyBen DannyBen deleted the fix/port-bind-config branch March 9, 2023 16:16
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.

Settings cannot take effect
1 participant