From 6c416e07387533476891c7b676a370d11f46e6f5 Mon Sep 17 00:00:00 2001 From: Philipp Kiemle Date: Fri, 19 Apr 2024 16:25:15 +0200 Subject: [PATCH] Remove backslash escapes From `eval --help`: Execute arguments as a shell command. Combine ARGs into a single string, use the result as input to the shell, and execute the resulting commands. This means that we don't need to worry about SC2086 here. --- KubuQA.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/KubuQA.sh b/KubuQA.sh index 431f976..97cec0d 100755 --- a/KubuQA.sh +++ b/KubuQA.sh @@ -123,10 +123,10 @@ check_existing_vm(){ # Check version and call the command with the correct parameters if [ "$vbox_version" -lt 7 ]; then # Version 6 - eval "$base_cmd" --ostype=\"Ubuntu \(64-bit\)\" --paravirtprovider=\"$PARAVIRT\" + eval "$base_cmd" --ostype="Ubuntu (64-bit)" --paravirtprovider="$PARAVIRT" else # Version 7 or higher - eval "$base_cmd" --os-type=\"Ubuntu_64\" --paravirt-provider=\"$PARAVIRT\" + eval "$base_cmd" --os-type="Ubuntu_64" --paravirt-provider="$PARAVIRT" fi #VBoxManage modifyvm "$VM_NAME" --ostype="Ubuntu (64-bit)" --acpi on --nic1 nat --cpus="$VM_CPU_CORES" --memory="$VM_RAM" --paravirtprovider="$PARAVIRT"