@@ -26,7 +26,6 @@ import (
26
26
27
27
"github.com/coder/envbuilder/constants"
28
28
"github.com/coder/envbuilder/git"
29
- "github.com/coder/envbuilder/internal/chmodfs"
30
29
"github.com/coder/envbuilder/options"
31
30
32
31
"github.com/GoogleContainerTools/kaniko/pkg/config"
@@ -42,7 +41,6 @@ import (
42
41
_ "github.com/distribution/distribution/v3/registry/storage/driver/filesystem"
43
42
"github.com/docker/cli/cli/config/configfile"
44
43
"github.com/fatih/color"
45
- "github.com/go-git/go-billy/v5/osfs"
46
44
"github.com/go-git/go-git/v5/plumbing/transport"
47
45
v1 "github.com/google/go-containerregistry/pkg/v1"
48
46
"github.com/google/go-containerregistry/pkg/v1/remote"
@@ -61,23 +59,8 @@ type DockerConfig configfile.ConfigFile
61
59
// Filesystem is the filesystem to use for all operations.
62
60
// Defaults to the host filesystem.
63
61
func Run (ctx context.Context , opts options.Options ) error {
64
- // Temporarily removed these from the default settings to prevent conflicts
65
- // between current and legacy environment variables that add default values.
66
- // Once the legacy environment variables are phased out, this can be
67
- // reinstated to the previous default values.
68
- if len (opts .IgnorePaths ) == 0 {
69
- opts .IgnorePaths = []string {
70
- "/var/run" ,
71
- // KinD adds these paths to pods, so ignore them by default.
72
- "/product_uuid" , "/product_name" ,
73
- }
74
- }
75
- if opts .InitScript == "" {
76
- opts .InitScript = "sleep infinity"
77
- }
78
- if opts .InitCommand == "" {
79
- opts .InitCommand = "/bin/sh"
80
- }
62
+ opts .SetDefaults ()
63
+
81
64
if opts .CacheRepo == "" && opts .PushImage {
82
65
return fmt .Errorf ("--cache-repo must be set when using --push-image" )
83
66
}
@@ -90,12 +73,6 @@ func Run(ctx context.Context, opts options.Options) error {
90
73
return fmt .Errorf ("parse init args: %w" , err )
91
74
}
92
75
}
93
- if opts .Filesystem == nil {
94
- opts .Filesystem = chmodfs .New (osfs .New ("/" ))
95
- }
96
- if opts .WorkspaceFolder == "" {
97
- opts .WorkspaceFolder = options .DefaultWorkspaceFolder (opts .GitURL )
98
- }
99
76
100
77
stageNumber := 0
101
78
startStage := func (format string , args ... any ) func (format string , args ... any ) {
0 commit comments