System functions not only for the Nexss Programmer
npm install @nexssp/systemnExec. Different aproach to run commands. If nSpawn has any issues this can be a solution. Keep in mind this module is experimental.
stripTerminalColors - removes from putput the colors, so the output is just a text.
js
// To output just to the terminal use option: {stdio: 'inherit'}
// To strip the terminal colors use stripTerminalColors
const result = nSpawn("nexss Id --something='x y z'", { stripTerminalColors: true });
{exitCode: int,
stderr: string,
stdout: string
cmd: string
args: array // parsed arguments (1.0.7+)
command: string // just orginal command (1.0.7+)
}
``