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

Revise behaviour of dump-config command #254

Closed
Martoon-00 opened this issue Dec 21, 2022 · 0 comments · Fixed by #257
Closed

Revise behaviour of dump-config command #254

Martoon-00 opened this issue Dec 21, 2022 · 0 comments · Fixed by #257
Assignees
Milestone

Comments

@Martoon-00
Copy link
Member

Clarification and motivation

Currently this command immediately writes to a file, while an intuition would say that it should just print config to the console. (and actually, it was me who implemented it this way 😓). But okay, this has some advantages.

But this command can also overwrite the previously created config. I.e. I could create config and tune it up, then accidentally call xrefcheck dump-config again (e.g. by getting this command from history) and all my changes will be lost. This is too bad.

Acceptance criteria

  • dump-config does not overwrite the existing file, unless this is told explicitly (with some --force flag).
  • (optional) How this command outputs the config is revised.
  • (optional) It is possible to print the config to stdout.
@Martoon-00 Martoon-00 added this to the 0.3.0 milestone Dec 21, 2022
@aeqz aeqz self-assigned this Dec 22, 2022
aeqz added a commit that referenced this issue Dec 22, 2022
Problem: xrefcheck does not allow to print the config to stdout instead
of writing it to a file. Also, it is easy to overwrite you changes by
mistake by executing the command again.

Solution: provide a --stdout flag to print the config to stdout, and do
not write it to a file unless a --force flag has been included.
aeqz added a commit that referenced this issue Dec 22, 2022
aeqz added a commit that referenced this issue Dec 22, 2022
Problem: xrefcheck does not allow to print the config to stdout instead
of writing it to a file. Also, it is easy to overwrite your changes by
mistake by executing the command again.

Solution: provide a --stdout flag to print the config to stdout, and do
not write it to a file unless a --force flag has been included.
aeqz added a commit that referenced this issue Dec 22, 2022
aeqz added a commit that referenced this issue Dec 23, 2022
Problem: xrefcheck does not allow to print the config to stdout instead
of writing it to a file. Also, it is easy to overwrite your changes by
mistake by executing the command again.

Solution: provide a --stdout flag to print the config to stdout, and do
not write it to a file unless a --force flag has been included.
@aeqz aeqz closed this as completed in #257 Dec 29, 2022
aeqz added a commit that referenced this issue Dec 29, 2022
PhilTaken pushed a commit that referenced this issue Jan 18, 2023
Problem: xrefcheck does not allow to print the config to stdout instead
of writing it to a file. Also, it is easy to overwrite your changes by
mistake by executing the command again.

Solution: provide a --stdout flag to print the config to stdout, and do
not write it to a file unless a --force flag has been included.
@int-index int-index mentioned this issue Dec 27, 2024
5 tasks
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 a pull request may close this issue.

2 participants