From 6ee3f865530435e8538a0d15d04f9d563aca2594 Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Tue, 4 Feb 2025 18:04:43 +0100 Subject: [PATCH] fix: dev: [nextcloud] make ``nextcloud:config:simple:add`` support wider range of chars Note: especially forward slashes ``/`` are now usable as values in config. --- nextcloud/lib/common | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nextcloud/lib/common b/nextcloud/lib/common index 328382b..2f46317 100644 --- a/nextcloud/lib/common +++ b/nextcloud/lib/common @@ -186,9 +186,9 @@ nextcloud:config:simple:add() { fi if grep "^ '$key' => '" "$CONFIGFILE" >/dev/null; then - sed -ri "s/^( '$key' => ')(.*)(',)$/\1${value}\3/g" "$CONFIGFILE" + sed -ri "s|^( '$key' => ')(.*)(',)$|\1${value}\3|g" "$CONFIGFILE" return 0 fi ## Add '$key' => 'value', to the end of the file, before the closing paren. - sed -ri "s/^(\);)$/ '$key' => '${value}',\n\1/g" "$CONFIGFILE" + sed -ri "s|^(\);)$| '$key' => '${value}',\n\1|g" "$CONFIGFILE" } \ No newline at end of file