MCPcopy Create free account
hub / github.com/angular/dev-infra / addDryRunFlag

Function addDryRunFlag

ng-dev/utils/dry-run.ts:15–27  ·  view source on GitHub ↗
(args: Argv<T>)

Source from the content-addressed store, hash-verified

13 * environment variable noting dry run mode.
14 */
15export function addDryRunFlag<T>(args: Argv<T>) {
16 return args.option('dry-run' as 'dryRun', {
17 type: 'boolean',
18 default: false,
19 description: 'Whether to do a dry run',
20 coerce: (dryRun: boolean) => {
21 if (dryRun) {
22 process.env['DRY_RUN'] = '1';
23 }
24 return dryRun;
25 },
26 });
27}
28
29/** Whether the current environment is in dry run mode. */
30export function isDryRun(): boolean {

Callers 1

builderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected