Skip to content

Commit 8d92b80

Browse files
committed
fix(@angular/cli): generating service dry run fix
Before, generating a service and providing it in a module, the dry run flag was ignored for the providing part. We dont provide the module now if its a dry-run. Fixes angular#5862.
1 parent 7377f66 commit 8d92b80

File tree

1 file changed

+7
-0
lines changed
  • packages/@angular/cli/blueprints/service

1 file changed

+7
-0
lines changed

packages/@angular/cli/blueprints/service/index.ts

+7
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,13 @@ export default Blueprint.extend({
103103
`;
104104
this._writeStatusToUI(chalk.yellow, 'WARNING', warningMessage);
105105
} else {
106+
if (options.dryRun) {
107+
this._writeStatusToUI(chalk.yellow,
108+
'update',
109+
path.relative(this.project.root, this.pathToModule));
110+
return;
111+
}
112+
106113
const className = stringUtils.classify(`${options.entity.name}Service`);
107114
const fileName = stringUtils.dasherize(`${options.entity.name}.service`);
108115
const fullGeneratePath = path.join(this.project.root, this.generatePath);

0 commit comments

Comments
 (0)