Skip to content

Commit

Permalink
fix: bug (#5305)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlhiter authored Dec 24, 2024
1 parent f65ddcf commit d3e971e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions extensions/ide/vscode/devbox/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how

- Adjust `Remote-SSH` to install by code.

### Fixed

- Fix Windows file authority issue caused by `Everyone` group.

## [1.2.1] - 2024-12-4

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion extensions/ide/vscode/devbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "devbox-aio",
"displayName": "%displayName%",
"description": "%description%",
"version": "1.3.2024120601",
"version": "1.3.2024122401",
"keywords": [
"devbox",
"remote development",
Expand Down
8 changes: 4 additions & 4 deletions extensions/ide/vscode/devbox/src/utils/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ export const ensureFileAccessPermission = async (path: string) => {
if (!username) {
throw new Error('can not get username')
}
// await execa('icacls', [path, '/inheritance:r'])
// await execa('icacls', [path, '/grant:r', `${username}:F`])
// await execa('icacls', [path, '/remove:g', 'everyone'])
await execa('icacls', [path, '/inheritance:d'])
await execa('icacls', [path, '/remove:g', 'everyone'])
} catch (error) {
Logger.error(`Failed to set file access permission: ${error}`)
}
Expand All @@ -40,7 +40,7 @@ export function ensureFileExists(filePath: string, parentDir: string) {
recursive: true,
})
fs.writeFileSync(filePath, '', 'utf8')
// .ssh/config authority
ensureFileAccessPermission(filePath)
}
// .ssh/config authority
ensureFileAccessPermission(filePath)
}

0 comments on commit d3e971e

Please sign in to comment.