Skip to content

fix(@angular/cli): dont show Nothing to be done on update #10275

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions packages/@angular/cli/commands/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,13 @@ export default class UpdateCommand extends SchematicCommand {
}

public async run(options: UpdateOptions) {

const schematicRunOptions = {
return this.runSchematic({
collectionName: this.collectionName,
schematicName: this.schematicName,
schematicOptions: options,
dryRun: options.dryRun,
force: false,
workingDir: this.project.root,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was workingDir removed? It doesn't look related to this fix.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not actually used anywhere in the function.

};

return this.runSchematic(schematicRunOptions);
showNothingDone: false,
});
}
}
4 changes: 3 additions & 1 deletion packages/@angular/cli/models/schematic-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export interface RunSchematicOptions {
debug?: boolean;
dryRun: boolean;
force: boolean;
showNothingDone?: boolean;
}

export interface GetOptionsOptions {
Expand Down Expand Up @@ -170,7 +171,8 @@ export abstract class SchematicCommand extends Command {
// Output the logging queue, no error happened.
loggingQueue.forEach(log => this.logger.info(log));

if (nothingDone) {
const showNothingDone = !(options.showNothingDone === false);
if (nothingDone && showNothingDone) {
this.logger.info('Nothing to be done.');
}
if (dryRun) {
Expand Down