Skip to content

Commit

Permalink
feat(bin, core): explicitly calls initialize: ensures initialization …
Browse files Browse the repository at this point in the history
…has always happened -at least o
  • Loading branch information
rafamel committed May 7, 2019
1 parent dc9e645 commit b887980
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/bin/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ export default async function main(argv: string[]): Promise<void> {
(plain.slice(-3) === ' --' ? plain.slice(0, -3) : plain)
);

await core.initialize();
switch (first) {
case ':run':
const [tasks, args] = splitBy(cmd._);
Expand Down
3 changes: 3 additions & 0 deletions src/core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ import initialize from './initialize';
let scopes: string[] = [];
const core = {
options,
async initialize(): Promise<void> {
await initialize();
},
async scopes(): Promise<string[]> {
return scopes;
},
Expand Down

0 comments on commit b887980

Please sign in to comment.