Skip to content

Commit 72e1897

Browse files
committed
Fix: don't pass cli command as shard name for lock & update commands
1 parent 6ded1e9 commit 72e1897

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/cli.cr

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ module Shards
5050
when "lock"
5151
Commands::Lock.run(
5252
path,
53-
args.reject(&.starts_with?("--")),
53+
args[1..-1].reject(&.starts_with?("--")),
5454
print: args.includes?("--print"),
5555
update: args.includes?("--update")
5656
)
@@ -59,7 +59,10 @@ module Shards
5959
when "prune"
6060
Commands::Prune.run(path)
6161
when "update"
62-
Commands::Update.run(path, args.reject(&.starts_with?("--")))
62+
Commands::Update.run(
63+
path,
64+
args[1..-1].reject(&.starts_with?("--"))
65+
)
6366
when "version"
6467
Commands::Version.run(args[1]? || path)
6568
else

0 commit comments

Comments
 (0)