diff options
author | feileacan <[email protected]> | 2020-10-18 01:40:48 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-10-18 01:40:48 +0100 |
commit | d019cdbbb29c00400ed5b74b99131087c7fb8aac (patch) | |
tree | 4796ca68535f612683dd7d0ec74cf84bcc673d25 /editors/code/src | |
parent | 7c4bb971456649ab18a5dadd355a96d53cb72ed1 (diff) |
Check cargoExtraArgs for undefined before using
Diffstat (limited to 'editors/code/src')
-rw-r--r-- | editors/code/src/run.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/editors/code/src/run.ts b/editors/code/src/run.ts index 459b7f250..17573cd82 100644 --- a/editors/code/src/run.ts +++ b/editors/code/src/run.ts | |||
@@ -129,7 +129,9 @@ export async function createTask(runnable: ra.Runnable, config: Config): Promise | |||
129 | } | 129 | } |
130 | 130 | ||
131 | const args = [...runnable.args.cargoArgs]; // should be a copy! | 131 | 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 | } | ||
133 | if (runnable.args.executableArgs.length > 0) { | 135 | if (runnable.args.executableArgs.length > 0) { |
134 | args.push('--', ...runnable.args.executableArgs); | 136 | args.push('--', ...runnable.args.executableArgs); |
135 | } | 137 | } |