basic: fix env expansion for strings leading with two dollar signs
The way to escape a literal dollar sign is to write "$$". But this does not work right if it's at the beginning of the argument. Fix it.
This commit is contained in:
@@ -541,7 +541,7 @@ char **replace_env_argv(char **argv, char **env) {
|
||||
STRV_FOREACH(i, argv) {
|
||||
|
||||
/* If $FOO appears as single word, replace it by the split up variable */
|
||||
if ((*i)[0] == '$' && (*i)[1] != '{') {
|
||||
if ((*i)[0] == '$' && (*i)[1] != '{' && (*i)[1] != '$') {
|
||||
char *e;
|
||||
char **w, **m = NULL;
|
||||
unsigned q;
|
||||
|
||||
Reference in New Issue
Block a user