home-manager: handle `$EDITOR` containing spaces

The quoted `$EDITOR` causes errors when using values containing
arguments, eg. "code --wait". This is in contrast to the majority of
tools (git, etc.) that do support this usage.

Fixes #1496
This commit is contained in:
Samuel Ainsworth 2020-09-19 16:22:26 -07:00 committed by Robert Helgesson
parent 0006da1381
commit 7e5fee4268
No known key found for this signature in database
GPG Key ID: 36BDAA14C2797E89
1 changed files with 5 additions and 1 deletions

View File

@ -165,7 +165,11 @@ function doEdit() {
setConfigFile
exec "$EDITOR" "$HOME_MANAGER_CONFIG"
# Don't quote $EDITOR in order to support values including options, e.g.,
# "code --wait".
#
# shellcheck disable=2086
exec $EDITOR "$HOME_MANAGER_CONFIG"
}
function doBuild() {