Skip to content

Change behaviour of --config-file flag with config commands #957

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

Merged
merged 3 commits into from
Oct 5, 2020

Conversation

silvanocerza
Copy link
Contributor

@silvanocerza silvanocerza commented Sep 18, 2020

Please check if the PR fulfills these requirements

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • What kind of change does this PR introduce?

Changes the behaviour of config init and config dump when using the --config-file flag.

  • What is the current behavior?

config init --dest-file <some_path_file> doesn't initialize a new config file using the specified path and always overrides existing file in default config path.

Calling config init --dest-file <path> --dest-dir <path> creates a new config file in path specified by --dest-dir.

Calling config dump --config-file <some_path_file> always prints the default configurations.

  • What is the new behavior?

Calling config init --dest-file <some_path_file> initializes a new config file using the specified path, if the file exists and the --overwrite flag is not set an error is returned, otherwise a new file is created.

Calling config init --dest-file <path> --dest-dir <path> now returns an error.

Calling config dump --config-file <some_path_file> prints the configuration file specified.

Calling config dump --config-file <some_path_file> --additional-urls=<urls> prints the configuration file specified but additional_urls are overridden by the ones specified with the flag.

  • Does this PR introduce a breaking change?

I don't think so. 🤔

  • Other information:

None.


See how to contribute

@silvanocerza silvanocerza force-pushed the scerza/config-file-flag branch from 820acee to eb82eb8 Compare September 18, 2020 10:09
@silvanocerza silvanocerza force-pushed the scerza/config-file-flag branch from 9393df4 to 90300e9 Compare September 21, 2020 14:22
@silvanocerza silvanocerza force-pushed the scerza/config-file-flag branch from 3977a47 to 8feb7cc Compare October 1, 2020 11:08
@silvanocerza silvanocerza force-pushed the scerza/config-file-flag branch from 8feb7cc to e0bc70a Compare October 1, 2020 13:30
Copy link

@ubidefeo ubidefeo left a comment

Choose a reason for hiding this comment

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

tested and approved

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.

2 participants