nixos-rebuild: don't quote $EDITOR

$EDITOR is allowed to contain flags, so it is important to allow the
shell to split this normally. For example, Sublime Text needs to be
passed --wait, since otherwise it will daemonise.
This commit is contained in:
V 2020-08-29 09:54:14 +02:00
parent be193a2057
commit e08bcdbec3

View File

@ -291,7 +291,7 @@ if [ "$action" = edit ]; then
if [[ -d $NIXOS_CONFIG ]]; then
NIXOS_CONFIG=$NIXOS_CONFIG/default.nix
fi
exec "${EDITOR:-nano}" "$NIXOS_CONFIG"
exec ${EDITOR:-nano} "$NIXOS_CONFIG"
else
exec nix edit "${lockFlags[@]}" -- "$flake#$flakeAttr"
fi