Skip to content

Commit 6a49d28

Browse files
committed
fix: dockerignore location
1 parent fa4b9cb commit 6a49d28

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

pkg/provider/pulumi/common/build.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
package common
1818

1919
import (
20-
"errors"
2120
"os"
2221
"path/filepath"
2322
"strings"
@@ -58,11 +57,9 @@ func dockerfile(projDir, provider string, c project.Compute) (string, error) {
5857
return "", err
5958
}
6059

61-
if _, err := os.Stat(filepath.Join(projDir, ".dockerignore")); errors.Is(err, os.ErrNotExist) {
62-
err = os.WriteFile(filepath.Join(projDir, ".dockerignore"), []byte(strings.Join(rt.BuildIgnore(), "\n")), 0o600)
63-
if err != nil {
64-
return "", err
65-
}
60+
err = os.WriteFile(fh.Name()+".dockerignore", []byte(strings.Join(rt.BuildIgnore(), "\n")), 0o600)
61+
if err != nil {
62+
return "", err
6663
}
6764

6865
fh.Close()

0 commit comments

Comments
 (0)