Skip to content

Commit

Permalink
fix commands in pipe operator with non string arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed May 3, 2024
1 parent 564ebb1 commit 3cd3b45
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
### Bugfix
* fix paused terminal when echo broken image
* fix returning String instance from interpreter
* fix commands in pipe operator with non string arguments

## 2.41.0
### Features
Expand Down
5 changes: 4 additions & 1 deletion js/pipe.js
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,10 @@
var quote = cmd.args_quotes[i];
return quote + unparse(arg) + quote;
}
return arg.replace(/ /g, '\\ ');
if (typeof arg === 'string') {
return arg.replace(/ /g, '\\ ');
}
return arg;
}).join(' ');
}
// -------------------------------------------------------------------------------
Expand Down

0 comments on commit 3cd3b45

Please sign in to comment.