git ssb

0+

cel-desktop / ssb-pkg



Tree: 4c58f1c6c3ddb86a97f27f0c84681d201ef1f75f

Files: 4c58f1c6c3ddb86a97f27f0c84681d201ef1f75f / 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