totvs-dtsenv-cli
Version:
TOTVS Datasul Environment Command Line
27 lines (18 loc) • 637 B
text/typescript
import * as program from "commander";
import * as fs from "fs";
import CommandUtils from "../utils/CommandUtils";
export default class ShutdownCommand {
static program : any
constructor(commander: any) {
commander.command('shutdown')
.description('Desliga o ambiente docker.')
.action(ShutdownCommand.actionCommand)
ShutdownCommand.program = commander;
}
static actionCommand() {
console.log("Desligando o ambiente...")
/** Desliga o ambiente docker. */
let cmd = CommandUtils.execCommandSync('docker-machine', ['stop'])
console.log("Ambiente desligado com sucesso.")
}
}