Skip to content
This repository was archived by the owner on Apr 28, 2020. It is now read-only.

Commit fff4f63

Browse files
teddy-codesNathan Potter
authored andcommitted
Allow dockerfile in hat path (#194)
1 parent 7354999 commit fff4f63

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

hat_builder.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,10 @@ func (b *hatBuilder) applyHat() (string, error) {
7171
return "", xerrors.Errorf("failed to resolve hat path: %w", err)
7272
}
7373

74-
dockerFilePath := filepath.Join(hatPath, "Dockerfile")
74+
dockerFilePath := hatPath
75+
if base := filepath.Base(hatPath); strings.ToLower(base) != "dockerfile" {
76+
dockerFilePath = filepath.Join(hatPath, "Dockerfile")
77+
}
7578

7679
dockerFileByt, err := ioutil.ReadFile(dockerFilePath)
7780
if err != nil {

0 commit comments

Comments
 (0)