Skip to content

Commit e1b1d79

Browse files
committed
Make env retrieval consistent in supervisor config
1 parent 2ccabda commit e1b1d79

File tree

1 file changed

+4
-1
lines changed
  • components/supervisor/pkg/supervisor

1 file changed

+4
-1
lines changed

components/supervisor/pkg/supervisor/config.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,9 @@ type WorkspaceConfig struct {
309309
// GitpodHeadless controls whether the workspace is running headless
310310
GitpodHeadless string `env:"GITPOD_HEADLESS"`
311311

312+
// BobDockerfilePath is the path to the Dockerfile image builder will attempt to build
313+
BobDockerfilePath string `env:"BOB_DOCKERFILE_PATH"`
314+
312315
// DebugEnabled controls whether the supervisor debugging facilities (pprof, grpc tracing) should be enabled
313316
DebugEnable bool `env:"SUPERVISOR_DEBUG_ENABLE"`
314317

@@ -470,7 +473,7 @@ func (c WorkspaceConfig) isDebugWorkspace() bool {
470473

471474
// isImageBuild returns true if the workspace is an image build.
472475
func (c WorkspaceConfig) isImageBuild() bool {
473-
return os.Getenv("BOB_DOCKERFILE_PATH") != ""
476+
return c.BobDockerfilePath != ""
474477
}
475478

476479
var contentSources = map[api.ContentSource]csapi.WorkspaceInitSource{

0 commit comments

Comments
 (0)