Skip to content

Commit 665b338

Browse files
committed
Change the working directory before running git submodule
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
1 parent e94c9d8 commit 665b338

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

codebase

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,10 @@ git_clone()
134134
local odir=$2
135135

136136
git clone "${repo}" "${odir}" || ERROR 1 "failed to clone git repo: ${repo}"
137-
git submodule update --init --recursive || ERROR 1 "failed to update git submodule: ${repo}"
137+
(
138+
cd "${odir}"
139+
git submodule update --init --recursive || ERROR 1 "failed to update git submodule: ${repo}"
140+
)
138141
}
139142

140143
git_checkout()

0 commit comments

Comments
 (0)