From 0e0bdb4aef6ce8a04721a195c2a00d15228c0257 Mon Sep 17 00:00:00 2001 From: Raine Date: Sun, 19 Nov 2023 01:12:59 +0100 Subject: [PATCH] fix: shell --- dot | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dot b/dot index 398ca9f..ed8b427 100755 --- a/dot +++ b/dot @@ -19,8 +19,8 @@ include() { func() { if is_function $(echo "super_$2"); then [ "${DO_SUDO:-yes}" = "yes" ] || return 0 - cmd="sh -c \". $1 && super_$2\"" - [ "$(id -u)" = "0" ] && $cmd || sudo $cmd + cmd=". $1 && super_$2" + [ "$(id -u)" = "0" ] && sh -c "$cmd" || sudo sh -c "$cmd" fi is_function $2 && $2 }