File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
tests/rspack-test/configCases/rslib/hashbang-and-chmod Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,11 @@ testCases.forEach(({ name, file }) => {
1515 expect ( content . startsWith ( '#!/usr/bin/env node\n' ) ) . toBe ( true ) ;
1616 } ) ;
1717
18- it ( `should set executable permissions (0o755) for files with hashbang (${ name } )` , ( ) => {
18+ // File permissions (chmod) are only supported on Unix-like systems (Linux, macOS, BSD, etc.).
19+ // Skip on Windows and WASM environments where Unix permissions are not supported.
20+ const itOnUnixOnly = ( process . platform !== 'win32' && ! process . env . WASM ) ? it : it . skip ;
21+
22+ itOnUnixOnly ( `should set executable permissions (0o755) for files with hashbang (${ name } )` , ( ) => {
1923 const filePath = path . resolve ( __dirname , file ) ;
2024 const stats = fs . statSync ( filePath ) ;
2125 const permissions = stats . mode & 0o777 ;
You can’t perform that action at this time.
0 commit comments