Skip to content

Commit

Permalink
Use Object destructuring.
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR authored and satoshun00 committed Dec 17, 2018
1 parent fe5d9a0 commit d5e5e61
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

'use strict';

const spawn = require('child_process').spawn;
const { spawn } = require('child_process');
const hugo = require('.');

const input = process.argv.slice(2);

spawn(hugo, input, {stdio: 'inherit'})
spawn(hugo, input, { stdio: 'inherit' })
.on('exit', process.exit);
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const BinWrapper = require('bin-wrapper');
const pkgConf = require('pkg-conf');
const pkg = require('../package');

const hugoVersion = pkg.hugoVersion;
const { hugoVersion } = pkg;
const baseUrl = `https://github.com/gohugoio/hugo/releases/download/v${hugoVersion}/`;

const binNameMap = {
Expand Down
4 changes: 2 additions & 2 deletions lib/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ bin(getProjectRoot()).run(['version'])
.then(() => {
signale.success('Hugo binary installed successfully!');
})
.catch(err => {
signale.fatal(`${err.message}\nHugo binary installation failed!`);
.catch(error => {
signale.fatal(`${error.message}\nHugo binary installation failed!`);
});

0 comments on commit d5e5e61

Please sign in to comment.