nyx/tests/dynamic_fixtures/javascript/commonjs_export/benign.js

21 lines
457 B
JavaScript
Raw Permalink Normal View History

2026-06-05 10:16:30 -05:00
// Phase 13 — CommonJS export, benign control.
'use strict';
const { execFileSync } = require('child_process');
function runPing(host) {
process.stdout.write('__NYX_SINK_HIT__\n');
try {
execFileSync('true', [host], {
encoding: 'utf8',
timeout: 5000,
stdio: ['ignore', 'pipe', 'ignore'],
});
return 'ok';
} catch (_e) {
return 'err';
}
}
module.exports = { runPing };