Skip to content

Commit

Permalink
fix(@angular/cli): supress module file modification when generating g…
Browse files Browse the repository at this point in the history
…uard with dry-run flag
  • Loading branch information
sarunint authored and Brocco committed May 24, 2017
1 parent 2f9e1f8 commit 872737b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/@angular/cli/blueprints/guard/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,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}Guard`);
const fileName = stringUtils.dasherize(`${options.entity.name}.guard`);
const fullGeneratePath = path.join(this.project.root, this.generatePath);
Expand Down

0 comments on commit 872737b

Please sign in to comment.