-
-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/edit: check if --force-linebreak coming from CLI or config
When --force-linebreak is set through the config file the conditional for opening the editor will always be satisfied no matter what's the other flag being used together, since it only requires NFlag() == 1 and linebreak being set. For instance: lab.toml: [mr_edit] force-linebreak = true cli: $ lab mr edit --ready [EDITOR IS OPENED] This patch fixes it by checking it linebreak is being actually set through the CLI, so in case NFlag() == 1 we're sure the user wants to open the editor considering the "force-linebreak". Signed-off-by: Bruno Meneguele <bmeneg@redhat.com>
- Loading branch information
Showing
2 changed files
with
38 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters