git ssb

0+

cel-desktop / ssb-pkg



Tree: 65191f9a9664f013ebe726bb95a1a54b086e1bd5

Files: 65191f9a9664f013ebe726bb95a1a54b086e1bd5 / 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