While running the command through script, Bash is expanding TLS_CERT
variable with extra single quotes, which is making my command to fail.
I have put simplified code here for readable format
Can anybody please suggest how to avoid this.
Code:
TLS_CERT="--set-file \"global.vertica.cert.vertica-ca\.crt\"=./vertica-1030.crt"
helm install opsb -n tns opsbridge-suite-2020.08.0-1-SNAPSHOT.tgz -f vert-opsb-values.yaml $TLS_CERT
Expected output :
helm install opsb -n tns opsbridge-suite-2020.08.0-1-SNAPSHOT.tgz -f vert-opsb-values.yaml --set-file "global.vertica.cert.vertica-ca\.crt"=./vertica-1030.crt
Actual Output:
helm install opsb -n tns opsbridge-suite-2020.08.0-1-SNAPSHOT.tgz -f vert-opsb-values.yaml --set-file '"global.vertica.cert.vertica-ca\.crt"=./vertica-1030.crt'