From 59da5da0da126ed4d83807fcd42d207efb5164f4 Mon Sep 17 00:00:00 2001 From: Gerard Bosch Date: Tue, 8 Feb 2022 18:51:20 +0100 Subject: [PATCH] Fix resticw arguments line It needs to be treated as an array so that complex commands like `stats latest` work. --- bin/resticw | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/resticw b/bin/resticw index ea249fb..843ef34 100755 --- a/bin/resticw +++ b/bin/resticw @@ -136,11 +136,12 @@ profile_file="${ENV_DIR}/${__profile}.env.sh" [[ ! -f "$profile_file" ]] && echo "Invalid profile: No such environment file ${profile_file}" && exit "$ERR_NO_SUCH_PROFILE" if [[ ! -r "$profile_file" ]]; then - echo "Error: could not read the environment file ${profile_file}. Are you running this script as the correct user? Maybe try sudo with the right user." + echo "Error: Could not read the environment file ${profile_file}. Are you running this script as the correct user? Maybe try sudo with the right user." exit "$ERR_PROFILE_NO_READ_PERM" fi echo -e "‣ Using profile: ${__profile} -- (${profile_file})\n" # shellcheck disable=SC2154,SC1090 -source "$profile_file" && restic "$_restic_arguments_line_" +source "$profile_file" && restic "${_restic_arguments_line_[@]}" +