Skip to content

Commit d019cdb

Browse files
authored
Check cargoExtraArgs for undefined before using
1 parent 7c4bb97 commit d019cdb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

editors/code/src/run.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,9 @@ export async function createTask(runnable: ra.Runnable, config: Config): Promise
129129
}
130130

131131
const args = [...runnable.args.cargoArgs]; // should be a copy!
132-
args.push(...runnable.args.cargoExtraArgs); // Append user-specified cargo options.
132+
if (runnable.args.cargoExtraArgs) {
133+
args.push(...runnable.args.cargoExtraArgs); // Append user-specified cargo options.
134+
}
133135
if (runnable.args.executableArgs.length > 0) {
134136
args.push('--', ...runnable.args.executableArgs);
135137
}

0 commit comments

Comments
 (0)