Skip to content

Commit

Permalink
Change release.js to support npm 2fa
Browse files Browse the repository at this point in the history
  • Loading branch information
Macil authored and rpominov committed Sep 14, 2018
1 parent 18d690a commit d7d41da
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions release.js
@@ -1,6 +1,6 @@
var child_process = require('child_process')
var inquirer = require('inquirer')
var semver = require('semver')
var shell = require('shelljs')
var fs = require('fs')

var pkg = require('./package.json')
Expand Down Expand Up @@ -80,7 +80,11 @@ function bumpVersion(fileName, obj, dry) {
function run(cmd, dry) {
console.log('Running `' + cmd + '`')
if (!dry) {
if (shell.exec(cmd, {silent: false}).code === 0) {
var proc = child_process.spawnSync(cmd, {
stdio: 'inherit',
shell: true
})
if (proc.status === 0) {
console.log('... ok')
} else {
console.error('... fail!')
Expand Down

0 comments on commit d7d41da

Please sign in to comment.