cp.execFileSync('docker', ['exec', '-it', containerId, '/bin/sh', '-c', '[ -e /bin/bash ] && /bin/bash || /bin/sh'], { 'stdio': 'inherit' }) } else { cp.execFileSync(`${__dirname}/../dockerRunScript.sh`, [containerId], { 'stdio': 'inherit' })
}; const {execFileSync} = require('child_process'); execFileSync(process.execPath, [__filename], { env: { NDD_IPC: process.env.NDD_IPC,
function runHello (hostProcess) { if (!hostProcess) { hostProcess = process.execPath } var testCode = "console.log(require('hello_world').hello())" return execFileSync(hostProcess, ['-e', testCode], { cwd: __dirname }).toString() }
function checkCharmapValid () { var data try { data = execFileSync('python', ['fixtures/test-charmap.py'], { cwd: __dirname }) } catch (err) { return false } var lines = data.toString().trim().split('\n') return lines.pop() === 'True' }
function zipSync (inPath, outPath) { if (process.platform === 'win32') { if (fs.statSync(inPath).isFile()) { var inFile = fs.readFileSync(inPath) var tmpPath = path.join(os.tmpdir(), 'cross-zip-' + Date.now()) fs.mkdirSync(tmpPath) fs.writeFileSync(path.join(tmpPath, path.basename(inPath)), inFile) inPath = tmpPath } rimraf.sync(outPath) } var opts = { cwd: path.dirname(inPath), maxBuffer: Infinity } cp.execFileSync(getZipCommand(), getZipArgs(inPath, outPath), opts) }
var BuildFile = function (inputFilePath, outputFilePath) { child_process.execFileSync(builderPath, [inputFilePath], { cwd: path.dirname(builderPath) }); try { fileSystem.accessSync(outputFilePath, fileSystem.F_OK); } catch (e) { throw "An error has occurred. Result File not found"; } }
runDBCommand(() => execFileSync('createdb', [`-U${user}`, `-h${host}`, database]));
function unzipSync (inPath, outPath) { var opts = { maxBuffer: Infinity } cp.execFileSync(getUnzipCommand(), getUnzipArgs(inPath, outPath), opts) }
execFileSync(createFilesScript);
const stdout = child_process.execFileSync( IPERF_PATH, [cpath, spath, SEC_PER_CASE.toString()], { encoding: 'utf-8' } );
console.log(`\nCannot link '${libs}', creating libs...`); const { execFileSync } = require('child_process'); execFileSync( 'node', [require.resolve('webpack/bin/webpack'), '--env.libs'],
function getEncoding () { var code = 'import locale;print(locale.getdefaultlocale()[1])' return execFileSync('python', ['-c', code]).toString().trim() }
function getServiceStatus(name) { try { execFileSync("service", [ name, "status" ]); return { active: true }; } catch (e) { return { active: false }; } }