aboutsummaryrefslogtreecommitdiff
path: root/src/cli/run_command.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/cli/run_command.zig')
-rw-r--r--src/cli/run_command.zig14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/cli/run_command.zig b/src/cli/run_command.zig
index e0ba11f83..a3f14bec2 100644
--- a/src/cli/run_command.zig
+++ b/src/cli/run_command.zig
@@ -178,6 +178,20 @@ pub const RunCommand = struct {
}
}
}
+
+ const npx_i = entry_i + "px ".len;
+ if (npx_i < script.len) {
+ const base = script[start..];
+ if (base.len > "px ".len) {
+ const remainder = base[0.."px ".len];
+ if (strings.eqlComptimeIgnoreLen(remainder, "px ")) {
+ try copy_script.appendSlice("bunx" ++ " ");
+ entry_i += remainder.len;
+ delimiter = 0;
+ continue;
+ }
+ }
+ }
}
delimiter = 0;