Skip to content

Commit 36f1fde

Browse files
authored
Merge pull request #2419 from atom-community/replace-bug
fix: if arg is not string assign it
2 parents ed28d3e + f7f591e commit 36f1fde

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

lib/runner.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,13 @@ export default class Runner {
164164
args = args.concat(scriptArgs);
165165

166166
const projectPath = this.getProjectPath || '';
167-
args = (args.map((arg) => this.fillVarsInArg(arg, codeContext, projectPath)));
167+
args = args.map((arg) => {
168+
if (typeof arg !== 'string') {
169+
// TODO why this happens? // https://github.com/atom-community/atom-script/issues/2082
170+
arg = '';
171+
}
172+
return this.fillVarsInArg(arg, codeContext, projectPath);
173+
});
168174

169175
if (!this.scriptOptions.cmd) {
170176
args = codeContext.shebangCommandArgs().concat(args);

0 commit comments

Comments
 (0)