Skip to content

Commit 836763e

Browse files
committed
fixing verification for users on protected mac user root folder
1 parent 9bd302b commit 836763e

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

tests/workspaceSafety.spec.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,12 @@ describe('WorkspaceSafety', () => {
8080
});
8181

8282
it('blocks parent of home directory (/Users on macOS)', () => {
83+
// This test only makes sense on actual macOS where /Users is used
84+
// On Linux, os.homedir() returns /home/..., not /Users/...
85+
// Skip on non-macOS platforms
86+
if (originalPlatform !== 'darwin') {
87+
return; // Skip on Linux/Windows
88+
}
8389
mockPlatform('darwin');
8490
const result = checkWorkspaceSafety('/Users');
8591
expect(result.safe).toBe(false);

0 commit comments

Comments
 (0)