(cmd, targetPath)
| 391 | } |
| 392 | |
| 393 | function commandIncludesPath(cmd, targetPath) { |
| 394 | if (!cmd || !targetPath) return false; |
| 395 | var cmdNorm = String(cmd).replace(/\\/g, '/'); |
| 396 | var candidates = [targetPath]; |
| 397 | try { candidates.push(fs.realpathSync(targetPath)); } catch (_) {} |
| 398 | return candidates.some(function(candidate) { |
| 399 | var normalized = path.resolve(candidate).replace(/\\/g, '/'); |
| 400 | return normalized && cmdNorm.includes(normalized); |
| 401 | }); |
| 402 | } |
| 403 | |
| 404 | function splitCommandLine(cmd) { |
| 405 | var tokens = []; |
no outgoing calls
no test coverage detected