From 0bf22caeb16e4fa4511757350d0fe488f1ceec4f Mon Sep 17 00:00:00 2001 From: Pavel Tumik <18602811+sagor999@users.noreply.github.com> Date: Tue, 24 May 2022 23:58:27 +0000 Subject: [PATCH] wip --- components/supervisor/pkg/supervisor/supervisor.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/components/supervisor/pkg/supervisor/supervisor.go b/components/supervisor/pkg/supervisor/supervisor.go index 624e5379dc6554..10cfcfc92b397d 100644 --- a/components/supervisor/pkg/supervisor/supervisor.go +++ b/components/supervisor/pkg/supervisor/supervisor.go @@ -1297,6 +1297,18 @@ func startContentInit(ctx context.Context, cfg *Config, wg *sync.WaitGroup, cst break } + repoRoot := os.Getenv("GITPOD_REPO_ROOT") + log.Infof("repo root: %s", repoRoot) + if repoRoot != "" { + if _, err := os.Stat(repoRoot); !os.IsNotExist(err) { + log.Infof("calling chmod: %s", repoRoot) + err = os.Chmod(repoRoot, os.FileMode(0755)) + if err != nil { + log.WithError(err).WithField("location", repoRoot).Warn("was not able to set chmod") + } + } + } + err = nil return }