Skip to content

Commit cbf5581

Browse files
arschlesAaron Schlesinger
authored andcommitted
fix(build.go): specify repo directory
1 parent cba29c0 commit cbf5581

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pkg/gitreceive/build.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ func build(conf *Config, builderKey, gitSha string) error {
157157
return fmt.Errorf("running %s (%s)", strings.Join(gitArchiveCmd.Args, " "), err)
158158
}
159159
// tar -xzf ${APP_NAME}.tar.gz -C $TMP_DIR/
160-
tarCmd := repoCmd("tar", "-xzf", fmt.Sprintf("%s.tar.gz", appName), "-C", fmt.Sprintf("%s/", tmpDir))
160+
tarCmd := repoCmd(repoDir, "tar", "-xzf", fmt.Sprintf("%s.tar.gz", appName), "-C", fmt.Sprintf("%s/", tmpDir))
161161
tarCmd.Stdout = os.Stdout
162162
tarCmd.Stderr = os.Stderr
163163
if err := tarCmd.Run(); err != nil {
@@ -483,7 +483,7 @@ func build(conf *Config, builderKey, gitSha string) error {
483483
// cd $REPO_DIR
484484
// git gc &>/dev/null
485485

486-
gcCmd := repoCmd("git", "gc")
486+
gcCmd := repoCmd(repoDir, "git", "gc")
487487
if err := gcCmd.Run(); err != nil {
488488
return fmt.Errorf("cleaning up the repository with %s (%s)", strings.Join(gcCmd.Args, " "), err)
489489
// TODO: is it ok not to exit even if the repo was not cleaned up

0 commit comments

Comments
 (0)