Skip to content

Commit

Permalink
fix(@angular/cli): generating service dry run fix
Browse files Browse the repository at this point in the history
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 #5862.
  • Loading branch information
hansl committed Apr 11, 2017
1 parent 2a903d2 commit be7c9b1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/@angular/cli/blueprints/service/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,13 @@ export default Blueprint.extend({
`;
this._writeStatusToUI(chalk.yellow, 'WARNING', warningMessage);
} else {
if (options.dryRun) {
this._writeStatusToUI(chalk.yellow,
'update',
path.relative(this.project.root, this.pathToModule));
return;
}

const className = stringUtils.classify(`${options.entity.name}Service`);
const fileName = stringUtils.dasherize(`${options.entity.name}.service`);
const fullGeneratePath = path.join(this.project.root, this.generatePath);
Expand Down

0 comments on commit be7c9b1

Please sign in to comment.