aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cli/bunx_command.zig3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cli/bunx_command.zig b/src/cli/bunx_command.zig
index 05d7d70df..2643d33a6 100644
--- a/src/cli/bunx_command.zig
+++ b/src/cli/bunx_command.zig
@@ -23,7 +23,8 @@ pub const BunxCommand = struct {
var new_str = try allocator.allocSentinel(u8, input.len + prefixLength, 0);
if (input[0] == '@') {
- if (strings.indexAnyComptime(input, "/")) |index| {
+ if (strings.indexAnyComptime(input, "/")) |slashIndex| {
+ const index = slashIndex + 1;
@memcpy(new_str[0..index], input[0..index]);
@memcpy(new_str[index .. index + prefixLength], "create-");
@memcpy(new_str[index + prefixLength ..], input[index..]);