Skip to content

Commit

Permalink
fix: postretrieve hook payload is now the file responses (#120)
Browse files Browse the repository at this point in the history
The postretrieve hook payload is now the file responses, which more closely matches the old
postsourceupdate hook.
  • Loading branch information
shetzel authored Jun 24, 2021
1 parent 7bd32ea commit a505389
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/commands/force/source/retrieve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,7 @@ export class Retrieve extends SourceCommand {
complete = true;
}
}

await this.lifecycle.emit('postretrieve', this.retrieveResult.response);
await this.lifecycle.emit('postretrieve', this.retrieveResult.getFileResponses());
}

protected resolveSuccess(): void {
Expand Down
2 changes: 1 addition & 1 deletion test/commands/source/retrieve.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ describe('force:source:retrieve', () => {
expect(lifecycleEmitStub.firstCall.args[0]).to.equal('preretrieve');
expect(lifecycleEmitStub.firstCall.args[1]).to.deep.equal([exampleSourceComponent]);
expect(lifecycleEmitStub.secondCall.args[0]).to.equal('postretrieve');
expect(lifecycleEmitStub.secondCall.args[1]).to.deep.equal(expectedResults.response);
expect(lifecycleEmitStub.secondCall.args[1]).to.deep.equal(expectedResults.inboundFiles);
};

it('should pass along sourcepath', async () => {
Expand Down

0 comments on commit a505389

Please sign in to comment.