From 034eed2c2efc2814cf5d6f407dd2247eb26bf529 Mon Sep 17 00:00:00 2001 From: Zoltan Varga Date: Tue, 3 Aug 2021 17:27:23 -0400 Subject: [PATCH] [mono][wasm] Allow setting env variables with '=' characters in the test runner. --- src/mono/wasm/runtime-test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mono/wasm/runtime-test.js b/src/mono/wasm/runtime-test.js index e661a5423a0d2..6796330a98012 100644 --- a/src/mono/wasm/runtime-test.js +++ b/src/mono/wasm/runtime-test.js @@ -168,9 +168,9 @@ while (args !== undefined && args.length > 0) { } else if (args [0].startsWith ("--setenv=")) { var arg = args [0].substring ("--setenv=".length); var parts = arg.split ('='); - if (parts.length != 2) + if (parts.length < 2) fail_exec ("Error: malformed argument: '" + args [0]); - setenv [parts [0]] = parts [1]; + setenv [parts [0]] = arg.substring (parts [0].length + 1); args = args.slice (1); } else if (args [0].startsWith ("--runtime-arg=")) { var arg = args [0].substring ("--runtime-arg=".length);