File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -129,18 +129,21 @@ function verifyStatObject(stat) {
129
129
130
130
if ( common . canCreateSymLink ( ) ) {
131
131
const newLink = path . resolve ( tmpDir , 'baz3.js' ) ;
132
- const newMode = 0o666 ;
133
132
await symlink ( newPath , newLink ) ;
134
- await lchmod ( newLink , newMode ) ;
135
-
136
133
stats = await lstat ( newLink ) ;
137
134
verifyStatObject ( stats ) ;
138
135
139
136
assert . strictEqual ( newPath . toLowerCase ( ) ,
140
137
( await realpath ( newLink ) ) . toLowerCase ( ) ) ;
141
138
assert . strictEqual ( newPath . toLowerCase ( ) ,
142
139
( await readlink ( newLink ) ) . toLowerCase ( ) ) ;
143
- assert . strictEqual ( stats . mode & 0o777 , newMode ) ;
140
+ if ( common . isOSX ) {
141
+ // lchmod is only available on macOS
142
+ const newMode = 0o666 ;
143
+ await lchmod ( newLink , newMode ) ;
144
+ assert . strictEqual ( await lstat ( newLink ) . mode & 0o777 , newMode ) ;
145
+ }
146
+
144
147
145
148
await unlink ( newLink ) ;
146
149
}
You can’t perform that action at this time.
0 commit comments