git ssb

0+

cel-desktop / ssb-pkg



Tree: ca90b5ca0579ebdcc0635288bce4978e3fb200f5

Files: ca90b5ca0579ebdcc0635288bce4978e3fb200f5 / test / test-50-spawn / test-node.js

481 bytesRaw
1#!/usr/bin/env node
2
3'use strict';
4
5var spawnSync = require('child_process').spawnSync;
6
7var child = spawnSync(
8 process.execPath, [
9 '-e', 'process.stdout.write("42")'
10 ], {
11 stdio: 'pipe',
12 // if run under node (process.execPath points to node.exe),
13 // then node ignores PKG_EXECPATH, but if run as pkged app,
14 // PKG_INVOKE_NODEJS is a hack to access internal nodejs
15 env: { PKG_EXECPATH: 'PKG_INVOKE_NODEJS' }
16 }
17);
18
19console.log(child.stdout.toString());
20

Built with git-ssb-web