Skip to content

Commit 3eb1ba5

Browse files
jentingroboquat
authored andcommitted
Chown all files and folders after git checkout
Signed-off-by: JenTing Hsiao <[email protected]>
1 parent 95b6194 commit 3eb1ba5

File tree

1 file changed

+7
-2
lines changed
  • components/content-service/pkg/initializer

1 file changed

+7
-2
lines changed

components/content-service/pkg/initializer/git.go

+7-2
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,11 @@ func (ws *GitInitializer) Run(ctx context.Context, mappings []archive.IDMapping)
110110
return src, xerrors.Errorf("git initializer gitClone: %w", err)
111111
}
112112

113-
if ws.Chown {
113+
defer func() {
114+
span.SetTag("Chown", ws.Chown)
115+
if !ws.Chown {
116+
return
117+
}
114118
// TODO (aledbf): refactor to remove the need of manual chown
115119
args := []string{"-R", "-L", "gitpod", ws.Location}
116120
cmd := exec.Command("chown", args...)
@@ -124,7 +128,8 @@ func (ws *GitInitializer) Run(ctx context.Context, mappings []archive.IDMapping)
124128
}
125129
return
126130
}
127-
}
131+
}()
132+
128133
if err := ws.realizeCloneTarget(ctx); err != nil {
129134
return src, xerrors.Errorf("git initializer clone: %w", err)
130135
}

0 commit comments

Comments
 (0)