An abstract class with a method to create a child process using node:child_process module.
Type: object literal
Type: boolean
Default: false
Whether to output the child process stdout / stderr (useful for debugging)
Type: string
const { Commands } = require("@abstracter/atomic-release");
class MoveCommand extends Commands.ExecCommand {
async do() {
await this.exec("mv", ["a", "b"]);
}
async undo() {
await this.exec("mv", ["b", "a"]);
}
}TIP: To log stdout & stderr regardless of the used
logStdconfig
an environment variable with CSV can be set:
process.env.EXEC_COMMAND_LOG_STD='GitTagCommand,GitPushBranchCommand'