@@ -26,6 +26,7 @@ import (
26
26
27
27
"github.com/coder/envbuilder/constants"
28
28
"github.com/coder/envbuilder/git"
29
+ "github.com/coder/envbuilder/internal/chmodfs"
29
30
"github.com/coder/envbuilder/options"
30
31
31
32
"github.com/GoogleContainerTools/kaniko/pkg/config"
@@ -41,7 +42,6 @@ import (
41
42
_ "github.com/distribution/distribution/v3/registry/storage/driver/filesystem"
42
43
"github.com/docker/cli/cli/config/configfile"
43
44
"github.com/fatih/color"
44
- "github.com/go-git/go-billy/v5"
45
45
"github.com/go-git/go-billy/v5/osfs"
46
46
"github.com/go-git/go-git/v5/plumbing/transport"
47
47
v1 "github.com/google/go-containerregistry/pkg/v1"
@@ -91,7 +91,7 @@ func Run(ctx context.Context, opts options.Options) error {
91
91
}
92
92
}
93
93
if opts .Filesystem == nil {
94
- opts .Filesystem = & osfsWithChmod { osfs .New ("/" )}
94
+ opts .Filesystem = chmodfs . New ( osfs .New ("/" ))
95
95
}
96
96
if opts .WorkspaceFolder == "" {
97
97
opts .WorkspaceFolder = options .DefaultWorkspaceFolder (opts .GitURL )
@@ -1053,14 +1053,6 @@ func newColor(value ...color.Attribute) *color.Color {
1053
1053
return c
1054
1054
}
1055
1055
1056
- type osfsWithChmod struct {
1057
- billy.Filesystem
1058
- }
1059
-
1060
- func (fs * osfsWithChmod ) Chmod (name string , mode os.FileMode ) error {
1061
- return os .Chmod (name , mode )
1062
- }
1063
-
1064
1056
func findDevcontainerJSON (options options.Options ) (string , string , error ) {
1065
1057
// 0. Check if custom devcontainer directory or path is provided.
1066
1058
if options .DevcontainerDir != "" || options .DevcontainerJSONPath != "" {
0 commit comments