File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -216,13 +216,17 @@ export async function spawnCoanaDlx(
216216 const localCoanaPath = process . env [ 'SOCKET_CLI_COANA_LOCAL_PATH' ]
217217 // Use local Coana CLI if path is provided.
218218 if ( localCoanaPath ) {
219+ const isBinary = ! localCoanaPath . endsWith ( '.js' ) && ! localCoanaPath . endsWith ( '.mjs' ) ;
220+
219221 const finalEnv = {
220222 ...process . env ,
221223 ...constants . processEnv ,
222224 ...mixinsEnv ,
223225 ...spawnEnv ,
224226 }
225- const spawnResult = await spawn ( 'node' , [ localCoanaPath , ...args ] , {
227+
228+ const spawnArgs = isBinary ? args : [ localCoanaPath , ...args ] ;
229+ const spawnResult = await spawn ( isBinary ? localCoanaPath : 'node' , spawnArgs , {
226230 cwd : dlxOptions . cwd ,
227231 env : finalEnv ,
228232 stdio : spawnExtra ?. [ 'stdio' ] || 'inherit' ,
You can’t perform that action at this time.
0 commit comments