corsica-cli
Advanced tools
Comparing version 1.3.0 to 1.4.0
14
index.js
@@ -24,7 +24,9 @@ #!/usr/bin/env node | ||
CLI version: ${version} | ||
${style.info('CLI version:')} ${version} | ||
${style.info('Node version:')} ${(await shell('node', ['-v'])).trim()} | ||
${style.info('NPM version:')} ${(await shell('npm', ['-v'])).trim()} | ||
Command run: ${program.rawArgs} | ||
${style.info('Command run:')} ${program.rawArgs} | ||
Error: | ||
${style.info('Error:')} | ||
${e} | ||
@@ -126,6 +128,10 @@ `); | ||
console.log(style.info('Updating...')); | ||
console.log(style.info('Updating Corsica and plugins...')); | ||
await shell('npm', ['update'], { cwd: installPath }); | ||
console.log(style.info('Updating corsica-cli...')); | ||
await shell('npm', ['install', '-g', 'corsica-cli']); | ||
console.log(style.good('Done!')); | ||
@@ -132,0 +138,0 @@ |
@@ -22,2 +22,7 @@ const shell = require('./shell'); | ||
await subprocess.catch(async e => { | ||
await config.set('pid', null); | ||
throw e; | ||
}); | ||
} | ||
@@ -24,0 +29,0 @@ |
{ | ||
"name": "corsica-cli", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -9,2 +9,3 @@ const { spawn } = require('child_process'); | ||
let output = ''; | ||
let error = ''; | ||
@@ -19,2 +20,3 @@ cmd.stdout.on('data', (data) => { | ||
cmd.stderr.on('data', (data) => { | ||
error += data; | ||
if (logging) { | ||
@@ -29,3 +31,3 @@ process.stderr.write(data); | ||
} else { | ||
reject(code); | ||
reject(error); | ||
} | ||
@@ -32,0 +34,0 @@ }); |
@@ -14,2 +14,3 @@ { | ||
"settings::tags": { | ||
"random": true, | ||
"tags": [ | ||
@@ -16,0 +17,0 @@ { |
15256
397