Skip to content

Commit

Permalink
Merge pull request #358 from 89luca89/fix/openvscode_docker_cpu_usage
Browse files Browse the repository at this point in the history
fix: resolve openvscode process eating CPU when using docker
  • Loading branch information
pascalbreuninger authored May 31, 2023
2 parents 6208428 + 2c17a06 commit 13df43c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion pkg/copy/copy.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ func ChownR(path string, userName string) error {
}

uid, _ := strconv.Atoi(userID.Uid)
gid, _ := strconv.Atoi(userID.Gid)
return filepath.WalkDir(path, func(name string, dirEntry fs.DirEntry, err error) error {
if err != nil {
return err
Expand All @@ -52,7 +53,7 @@ func ChownR(path string, userName string) error {
}

if err == nil {
err = os.Chown(name, uid, -1)
err = os.Chown(name, uid, gid)
}
return err
})
Expand Down
4 changes: 2 additions & 2 deletions pkg/ide/openvscode/openvscode.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ var Options = ide.Options{
VersionOption: {
Name: VersionOption,
Description: "The version for the open vscode binary",
Default: "v1.76.2",
Default: "v1.78.2",
},
OpenOption: {
Name: OpenOption,
Expand Down Expand Up @@ -210,7 +210,7 @@ func (o *OpenVSCodeServer) installSettings() error {
return err
}

err = copy2.ChownR(settingsDir, o.userName)
err = copy2.ChownR(location, o.userName)
if err != nil {
return err
}
Expand Down

0 comments on commit 13df43c

Please sign in to comment.