UNPKG

why-is-node-running

Version:

Node is running but you don't know why? why-is-node-running is here to help you.

17 lines (12 loc) 327 B
#!/usr/bin/env node import { spawn } from 'node:child_process' import path from 'node:path' const [prog, ...progArgs] = process.argv.slice(2) console.info('probing program', prog) const args = [ '--import', path.join(import.meta.dirname, 'include.js'), prog, ...progArgs ] spawn('node', args, { stdio: 'inherit' })