Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(client-runtime): highlight inline scripts after bundled exec -a options #48261

Opensaphid(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/48261/headopened View on GitHub

Showing 2 changed files with 4 additions and 0 deletions.

x
0 of 2 viewed, 2 left
3 additions and 0 deletionspackages/client-runtime/src/work-log/embeddedScripts.test.tsModified
View file
@@ -190,6 +190,9 @@
[`env -- FOO=1 python3 -c 'print(1)'`, "python", "print(1)"],
[`env -iu UNUSED python3 -c 'print(42)'`, "python", "print(42)"],
[`env -iuUNUSED python3 -c 'print(42)'`, "python", "print(42)"],
+ [`exec -ca myname python3 -c 'print(1)'`, "python", "print(1)"],
+ [`exec -la myname python3 -c 'print(1)'`, "python", "print(1)"],
+ [`exec -lca myname python3 -c 'print(1)'`, "python", "print(1)"],
[`sudo -Eu bob python3 -c 'print(1)'`, "python", "print(1)"],
[`sudo -nHu postgres psql -c 'select 1'`, "sql", "select 1"],
[`sudo -S -p '' python3 -c 'print(1)'`, "python", "print(1)"],
1 addition and 0 deletionspackages/client-runtime/src/work-log/embeddedScripts.tsModified
View file
@@ -381,6 +381,7 @@
isOption &&
(valueOptions.has(value) ||
(isTimeout && /^-[fpv]*[ks]$/u.test(value)) ||
+ (name === "exec" && /^-[cl]+a$/u.test(value)) ||
(name === "env" && /^-[i0v]+[uC]$/u.test(value)) ||
(name === "sudo" && /^-[ABEHKNPSVbiklnsv]+[ugCDprtTR]$/u.test(value)));
index += takesValue ? 2 : 1;