Project

General

Profile

Actions

Bug #20128

closed

Variable string from command fails when command contains control structures

Added by Alexis Mousset about 3 years ago. Updated over 2 years ago.

Status:
Released
Priority:
N/A
Category:
Generic methods
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
Checked
Regression:

Description

When the command contains control structures it fails:

E| compliant     plouf                     Variable string from com| test2              Set the string plouff.test2 to the output of 'if [ true ]; then echo plop1 && echo foo 1>&2; else echo plop2; fi;' was correct
2021-10-14T08:42:14+00:00 R: The 'if [ true ]; then echo plop1 && echo foo 1>&2; else echo plop2; fi;' command returned ' command substitution: line 2: syntax error near unexpected token `then'
2021-10-14T08:42:14+00:00 sh: command substitution: line 2: `/bin/true; 2>/dev/null if [ true ]; then echo plop1 && echo foo 1>&2; else echo plop2; fi;''

Subtasks 1 (0 open1 closed)

Bug #20921: Adapt parent ticket for 7.0ReleasedAlexis MoussetActions
Actions

Also available in: Atom PDF