Skip to content

Commit

Permalink
change spinner message location
Browse files Browse the repository at this point in the history
  • Loading branch information
volkanto committed Jun 2, 2021
1 parent 8b975f4 commit b1219a0
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions bin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,6 @@ async function run() {

try {

spinner.start('Checking internet connection.');
const isInternetUp = await isOnline();
if (!isInternetUp) {
spinner.fail('There is no internet connection!');
return;
}
spinner.succeed('Internet connection established');

const options = yargs
.version(pkg.version)
.usage("Usage: yaba -o <owner> -r <repository> -t <tag> -n <release-name> -b <body> -d <draft> -c")
Expand All @@ -44,6 +36,14 @@ async function run() {
return;
}

spinner.start('Checking internet connection.');
const isInternetUp = await isOnline();
if (!isInternetUp) {
spinner.fail('There is no internet connection!');
return;
}
spinner.succeed('Internet connection established');

const { data: user } = await octokit.request('GET /user');
const username = user.login;
const repoOwner = helper.retrieveOwner(options.owner, username);
Expand Down

0 comments on commit b1219a0

Please sign in to comment.