Skip to content

Commit

Permalink
escape , from env var value (#589)
Browse files Browse the repository at this point in the history
  • Loading branch information
roi-codefresh authored Nov 15, 2020
1 parent 9f17f57 commit 4a08b39
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions lib/interface/cli/commands/hybrid/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ async function runClusterAcceptanceTests({
if (envVars) {
envVars.forEach((item) => {
const parts = item.split('=');
cmd.push(`--set-value=EnvVars.${parts[0]}=${parts[1]}`);
cmd.push(`--set-value=EnvVars.${parts[0]}=${parts[1].replace(/,/g, '\\,')}`);
});
}
if (valuesFile) {
Expand Down Expand Up @@ -565,7 +565,7 @@ async function installAgent({
if (envVars) {
envVars.forEach((item) => {
const parts = item.split('=');
cmd.push(`--set-value=EnvVars.${parts[0]}=${parts[1]}`);
cmd.push(`--set-value=EnvVars.${parts[0]}=${parts[1].replace(/,/g, '\\,')}`);
});
}
if (valuesFile) {
Expand Down Expand Up @@ -641,7 +641,7 @@ async function installRuntime({
if (envVars) {
envVars.forEach((item) => {
const parts = item.split('=');
cmd.push(`--set-value=EnvVars.${parts[0]}=${parts[1]}`);
cmd.push(`--set-value=EnvVars.${parts[0]}=${parts[1].replace(/,/g, '\\,')}`);
});
}
if (setFile) {
Expand Down Expand Up @@ -719,7 +719,7 @@ async function installAppProxy({
if (envVars) {
envVars.forEach((item) => {
const parts = item.split('=');
cmd.push(`--set-value=EnvVars.${parts[0]}=${parts[1]}`);
cmd.push(`--set-value=EnvVars.${parts[0]}=${parts[1].replace(/,/g, '\\,')}`);
});
}
if (valuesFile) {
Expand Down
2 changes: 1 addition & 1 deletion lib/interface/cli/commands/monitor/install.cmd.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ const installMonitorCmd = new Command({
if (envVars) {
envVars.forEach((item) => {
const parts = item.split('=');
commands.push(`--set-value=EnvVars.${parts[0]}=${parts[1]}`);
commands.push(`--set-value=EnvVars.${parts[0]}=${parts[1].replace(/,/g, '\\,')}`);
});
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "codefresh",
"version": "0.73.19",
"version": "0.73.20",
"description": "Codefresh command line utility",
"main": "index.js",
"preferGlobal": true,
Expand Down

0 comments on commit 4a08b39

Please sign in to comment.