Skip to content

Commit 4a08b39

Browse files
escape , from env var value (#589)
1 parent 9f17f57 commit 4a08b39

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

lib/interface/cli/commands/hybrid/helper.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ async function runClusterAcceptanceTests({
462462
if (envVars) {
463463
envVars.forEach((item) => {
464464
const parts = item.split('=');
465-
cmd.push(`--set-value=EnvVars.${parts[0]}=${parts[1]}`);
465+
cmd.push(`--set-value=EnvVars.${parts[0]}=${parts[1].replace(/,/g, '\\,')}`);
466466
});
467467
}
468468
if (valuesFile) {
@@ -565,7 +565,7 @@ async function installAgent({
565565
if (envVars) {
566566
envVars.forEach((item) => {
567567
const parts = item.split('=');
568-
cmd.push(`--set-value=EnvVars.${parts[0]}=${parts[1]}`);
568+
cmd.push(`--set-value=EnvVars.${parts[0]}=${parts[1].replace(/,/g, '\\,')}`);
569569
});
570570
}
571571
if (valuesFile) {
@@ -641,7 +641,7 @@ async function installRuntime({
641641
if (envVars) {
642642
envVars.forEach((item) => {
643643
const parts = item.split('=');
644-
cmd.push(`--set-value=EnvVars.${parts[0]}=${parts[1]}`);
644+
cmd.push(`--set-value=EnvVars.${parts[0]}=${parts[1].replace(/,/g, '\\,')}`);
645645
});
646646
}
647647
if (setFile) {
@@ -719,7 +719,7 @@ async function installAppProxy({
719719
if (envVars) {
720720
envVars.forEach((item) => {
721721
const parts = item.split('=');
722-
cmd.push(`--set-value=EnvVars.${parts[0]}=${parts[1]}`);
722+
cmd.push(`--set-value=EnvVars.${parts[0]}=${parts[1].replace(/,/g, '\\,')}`);
723723
});
724724
}
725725
if (valuesFile) {

lib/interface/cli/commands/monitor/install.cmd.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ const installMonitorCmd = new Command({
121121
if (envVars) {
122122
envVars.forEach((item) => {
123123
const parts = item.split('=');
124-
commands.push(`--set-value=EnvVars.${parts[0]}=${parts[1]}`);
124+
commands.push(`--set-value=EnvVars.${parts[0]}=${parts[1].replace(/,/g, '\\,')}`);
125125
});
126126
}
127127

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codefresh",
3-
"version": "0.73.19",
3+
"version": "0.73.20",
44
"description": "Codefresh command line utility",
55
"main": "index.js",
66
"preferGlobal": true,

0 commit comments

Comments
 (0)