Skip to content

Commit 0b08c94

Browse files
committed
fix: Using wrong positional argument for do-plumbing-clone
1 parent c2a372f commit 0b08c94

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pkg/lib/commands/do-plumbing-clone.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ do-plumbing-clone() {
44
local use_ssh="$1"
55
local site="$2"
66
local package="$3"
7-
local ref="$5"
7+
local ref="$4"
88

99
ensure.nonZero 'use_ssh' "$use_ssh"
1010
ensure.nonZero 'site' "$site"
@@ -22,7 +22,7 @@ do-plumbing-clone() {
2222
fi
2323

2424
if [ -n "$ref" ]; then
25-
gitArgs+=(-b "$ref")
25+
gitArgs+=(--branch "$ref")
2626
fi
2727

2828
if [ "$use_ssh" = "true" ]; then

tests/do-plumbing-clone.bats

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ load 'util/init.sh'
88
run do-plumbing-clone false site username/package version
99

1010
assert_success
11-
assert_output "git clone --recursive --depth=1 -b version https://site/username/package.git $BPM_PACKAGES_PATH/username/package"
11+
assert_output "git clone --recursive --depth=1 --branch version https://site/username/package.git $BPM_PACKAGES_PATH/username/package"
1212
}
1313

1414
@test "does nothing if package is already present" {

0 commit comments

Comments
 (0)