Skip to content

Commit

Permalink
fix: throw when hub is installed but not configured (#208)
Browse files Browse the repository at this point in the history
  • Loading branch information
Eunjae Lee authored Aug 21, 2019
1 parent 6eeb7f2 commit a4c769c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ github.com:

You can get an access token from [here](https://github.com/settings/tokens).

Or you can simply run `hub api`, follow the instruction and it will generate the token and write the config file for you.
Or you can simply run `hub api user`, follow the instruction and it will generate the token and write the config file for you.

### Dry Mode

Expand Down
9 changes: 9 additions & 0 deletions packages/shipjs/src/step/checkHub.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,14 @@ export default () =>
);
exitProcess(1);
}
const configured =
silentExec('yes "" | hub api user', { ignoreError: true }).code === 0;
if (!configured) {
print(error('You need to configure `hub`.'));
print(
' > https://github.com/algolia/shipjs/blob/master/GUIDE.md#install-hub'
);
exitProcess(1);
}
}
);

0 comments on commit a4c769c

Please sign in to comment.