+20
-10
@@ -708,2 +708,7 @@ #!/usr/bin/env node | ||
| function exitOnSpawnFailure(err) { | ||
| printSpawnFailure(err) | ||
| process.exit(1) | ||
| } | ||
| function spawnInstalledBinary(options = {}) { | ||
@@ -720,15 +725,20 @@ if (!fs.existsSync(CONFIG.binaryPath)) { | ||
| error.code = 'BINARY_MISSING' | ||
| printSpawnFailure(error) | ||
| process.exit(1) | ||
| exitOnSpawnFailure(error) | ||
| } | ||
| const child = spawn(CONFIG.binaryPath, process.argv.slice(2), { | ||
| stdio: 'inherit', | ||
| ...options, | ||
| }) | ||
| // spawn() only emits 'error' asynchronously for a few errno values | ||
| // (EACCES, EAGAIN, EMFILE, ENFILE, ENOENT); everything else — notably | ||
| // UNKNOWN on Windows when antivirus or Smart App Control blocks the | ||
| // exe or the download is corrupt — is thrown synchronously. | ||
| let child | ||
| try { | ||
| child = spawn(CONFIG.binaryPath, process.argv.slice(2), { | ||
| stdio: 'inherit', | ||
| ...options, | ||
| }) | ||
| } catch (err) { | ||
| exitOnSpawnFailure(err) | ||
| } | ||
| child.on('error', (err) => { | ||
| printSpawnFailure(err) | ||
| process.exit(1) | ||
| }) | ||
| child.on('error', exitOnSpawnFailure) | ||
@@ -735,0 +745,0 @@ return child |
+1
-1
| { | ||
| "name": "freebuff", | ||
| "version": "0.0.106", | ||
| "version": "0.0.107", | ||
| "description": "The world's strongest free coding agent", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
AI-detected potential malware
Supply chain riskAI has identified this package as malware. This is a strong signal that the package may be malicious.
Found 1 instance in 1 package
30373
1.24%886
1.03%2
100%