Skip to content

Commit be39b2d

Browse files
authored
Merge pull request #765 from LiliC/lili/adjust-error-msg
internal/../project_util.go: Adjust error msg
2 parents 4a9d5a5 + 310ae5d commit be39b2d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

internal/util/projutil/project_util.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,11 @@ func MustInProjectRoot() {
4949
// if the current directory has the "./build/dockerfile" file, then it is safe to say
5050
// we are at the project root.
5151
_, err := os.Stat(buildDockerfile)
52-
if err != nil && os.IsNotExist(err) {
53-
log.Fatalf("must run command in project root dir: (%v)", err)
52+
if err != nil {
53+
if os.IsNotExist(err) {
54+
log.Fatal("must run command in project root dir: project structure requires ./build/Dockerfile")
55+
}
56+
log.Fatalf("error: (%v) while checking if current directory is the project root", err)
5457
}
5558
}
5659

0 commit comments

Comments
 (0)