File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -210,7 +210,11 @@ const spawnToolsHost = async (
210210
211211 // Deny network and fs write by omission
212212 if ( pluginIsolation === 'strict' ) {
213- nodeArgs . push ( '--experimental-permission' ) ;
213+ // nodeArgs.push('--experimental-permission');
214+ const major = options ?. nodeVersion || 0 ;
215+ const permissionFlag = major >= 24 ? '--permission' : '--experimental-permission' ;
216+
217+ nodeArgs . push ( permissionFlag ) ;
214218
215219 // 1) Gather directories (project, plugin modules, and the host entry's dir)
216220 const allowSet = new Set < string > ( computeFsReadAllowlist ( ) ) ;
@@ -236,6 +240,7 @@ const spawnToolsHost = async (
236240
237241 // Optional debug to verify exactly what the child gets
238242 log . debug ( `Tools Host allow-fs-read flags: ${ allowList . map ( dir => `--allow-fs-read=${ dir } ` ) . join ( ' ' ) } ` ) ;
243+ log . debug ( `Tools Host permission flag: ${ permissionFlag } ` ) ;
239244 }
240245
241246 // Pre-compute file and package tool modules before spawning to reduce latency
You can’t perform that action at this time.
0 commit comments