-
Notifications
You must be signed in to change notification settings - Fork 698
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix parsing of password-command option (#6268)
The password-command option does not parse its value correctly. Quotes are ignored, making many kinds of commands impossible to express (e.g. `sh -c "foo | bar"`). Also, `cabal user-config` treats the argument list as a *list of option values*, rather than a *value that is a list*. As a consequence, `cabal user-config update` corrupts the value in the config file. Fix these issues by parsing the command as a space separated list of tokens, and changing the getter to `unwords` the value and return a *singleton* list. Also update the argument placeholder from `PASSWORD` to `COMMAND`. Fixes: #6268
- Loading branch information
1 parent
a191f0a
commit 1927d8c
Showing
5 changed files
with
27 additions
and
2 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
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
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