From 6810659f9b958dac7d616d6d7b2f2b0b9b1f4955 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Wed, 26 May 2021 14:16:43 +0200 Subject: [PATCH] Pass ha command with quotes to CLI container (#1377) When using quotes currently, they are not passed to HA due to $*. This doesn't allow to use some commands properly, e.g. snapshot restore with a passwort with spaces: ``` ha snapshot restore c31f3c93 --password "test test" ... time="2021-05-26T11:24:19+02:00" level=fatal msg="Error while executing rootCmd: accepts 1 arg(s), received 2" ``` Properly pass all arguments using $@ in quotes. --- buildroot-external/rootfs-overlay/usr/bin/ha | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/buildroot-external/rootfs-overlay/usr/bin/ha b/buildroot-external/rootfs-overlay/usr/bin/ha index 6a371db0c..f4e49f932 100755 --- a/buildroot-external/rootfs-overlay/usr/bin/ha +++ b/buildroot-external/rootfs-overlay/usr/bin/ha @@ -3,5 +3,4 @@ # HA utility # ============================================================================== -# shellcheck disable=SC2048,SC2086 -docker exec hassio_cli ha $* +docker exec hassio_cli ha "$@"