From 7e5fee4268f53be8758598b7634dff8b3ad8a22b Mon Sep 17 00:00:00 2001 From: Samuel Ainsworth Date: Sat, 19 Sep 2020 16:22:26 -0700 Subject: [PATCH] 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 --- home-manager/home-manager | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/home-manager/home-manager b/home-manager/home-manager index 2ad91dc90..96de69148 100644 --- a/home-manager/home-manager +++ b/home-manager/home-manager @@ -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() {