feat(dev-infra): write outputs of command runs to ng-dev log file (#38599)

Creates infrastructure to write outputs of command runs to ng-dev log file.
Additionally, on commands which fail with an exit code greater than 1, an
error log file is created with the posix timestamp of the commands run time
as an identifier.

PR Close #38599
This commit is contained in:
Joey Perrott
2020-08-26 11:38:19 -07:00
parent 52c7a4bfc6
commit 3487b549fd
3 changed files with 64 additions and 0 deletions

View File

@ -13,8 +13,10 @@ import {buildCommitMessageParser} from './commit-message/cli';
import {buildFormatParser} from './format/cli';
import {buildReleaseParser} from './release/cli';
import {buildPrParser} from './pr/cli';
import {captureLogOutputForCommand} from './utils/console';
yargs.scriptName('ng-dev')
.middleware(captureLogOutputForCommand)
.demandCommand()
.recommendCommands()
.command('commit-message <command>', '', buildCommitMessageParser)