mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-22 23:15:56 +08:00
parent
b62e3f6721
commit
6870be2029
@ -173,6 +173,9 @@ export abstract class SchematicCommand extends Command {
|
|||||||
if (nothingDone) {
|
if (nothingDone) {
|
||||||
this.logger.info('Nothing to be done.');
|
this.logger.info('Nothing to be done.');
|
||||||
}
|
}
|
||||||
|
if (dryRun) {
|
||||||
|
this.logger.warn(`\nNOTE: Run with "dry run" no changes were made.`);
|
||||||
|
}
|
||||||
resolve();
|
resolve();
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -4,5 +4,10 @@ import {expectGitToBeClean} from '../../../utils/git';
|
|||||||
|
|
||||||
export default function() {
|
export default function() {
|
||||||
return ng('generate', 'service', 'test-service', '--module', 'app.module.ts', '--dry-run')
|
return ng('generate', 'service', 'test-service', '--module', 'app.module.ts', '--dry-run')
|
||||||
|
.then(({stdout}) => {
|
||||||
|
if (!/NOTE: Run with "dry run" no changes were made/.test(stdout)) {
|
||||||
|
throw 'Dry run warning not shown.';
|
||||||
|
}
|
||||||
|
})
|
||||||
.then(() => expectGitToBeClean());
|
.then(() => expectGitToBeClean());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user