6274: Check cargoExtraArgs for undefined before using r=matklad a=feileacan

Fixes #6273 

Co-authored-by: feileacan <54381366+feileacan@users.noreply.github.com>
This commit is contained in:
bors[bot] 2020-10-19 15:35:32 +00:00 committed by GitHub
commit 2c5bd9517e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -129,7 +129,9 @@ export async function createTask(runnable: ra.Runnable, config: Config): Promise
}
const args = [...runnable.args.cargoArgs]; // should be a copy!
args.push(...runnable.args.cargoExtraArgs); // Append user-specified cargo options.
if (runnable.args.cargoExtraArgs) {
args.push(...runnable.args.cargoExtraArgs); // Append user-specified cargo options.
}
if (runnable.args.executableArgs.length > 0) {
args.push('--', ...runnable.args.executableArgs);
}