Skip to content

Commit cf013ee

Browse files
committed
debug logs
1 parent 9ac7352 commit cf013ee

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

cli/pkg/spec/spec.go

+11-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,17 @@ func RunSpecManualCommand(
189189
utils.ExtractZip(zipPath, tempDir)
190190
// Transforming: /var/temp/xxx/yyy/blabla.zip -> /var/temp/xxx/yyy/blabla
191191
gitLocation := strings.TrimSuffix(zipPath, ".zip")
192-
os.Chdir(gitLocation)
192+
log.Printf("git location is: %v", gitLocation)
193+
log.Printf("zipPath: %v", zipPath)
194+
f, err := os.Stat(tempDir)
195+
log.Printf("files in %v : %v ", tempDir, f)
196+
197+
err = os.Chdir(gitLocation)
198+
if err != nil {
199+
log.Printf("Could not chdir: %v", err)
200+
usage.ReportErrorAndExit(spec.VCS.Actor, fmt.Sprintf("could not change directory: %v", err), 1)
201+
}
202+
193203
cmd := exec.Command("git", "init")
194204
cmd.Stdout = os.Stdout
195205
cmd.Stderr = os.Stderr

0 commit comments

Comments
 (0)