Skip to content

Commit

Permalink
support running bit log on local components with scope (teambit#1064)
Browse files Browse the repository at this point in the history
  • Loading branch information
amitgilad3 authored and GiladShoham committed Jun 13, 2018
1 parent 9453e92 commit 9fb1fca
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- fix output when running bit diff after tagging component
- fix - after auto-tagging a component with a pending update - it became modified
- added missing programmatic flags for bit isolate cmd
- fix - running bit log on local components with scope

## [13.0.0-dev.10] - 2018-06-08

Expand Down
9 changes: 8 additions & 1 deletion src/api/consumer/lib/get-component-logs.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,12 @@ import { loadConsumer } from '../../../consumer';
import { BitId } from '../../../bit-id';

export default function getComponentLogs(id: string) {
return loadConsumer().then(consumer => consumer.scope.loadComponentLogs(BitId.parse(id)));
return loadConsumer().then(async (consumer) => {
const bitId = BitId.parse(id);
const component = await consumer.loadComponent(id);
if (!bitId.scope && component) {
if (component.box === bitId.box && component.name === bitId.name) bitId.scope = component.scope;
}
return consumer.scope.loadComponentLogs(bitId);
});
}

0 comments on commit 9fb1fca

Please sign in to comment.