0.0.7 Fixed cli launch problem for global npm install

master
David Kebler 2019-02-26 10:19:25 -08:00
parent 98d6365b61
commit 6da55d924c
5 changed files with 6 additions and 5 deletions

3
bin/sync-cli Executable file
View File

@ -0,0 +1,3 @@
#! /usr/bin/env node
require = require('esm')(module)
require('./sync.js') // iife

View File

@ -1,3 +0,0 @@
// Set options as a parameter, environment variable, or rc file.
require = require('esm')(module)
module.exports = require('./sync.js')

0
bin/sync.js Normal file → Executable file
View File

View File

@ -1,10 +1,10 @@
{
"name": "@uci-utils/sync",
"version": "0.0.6",
"version": "0.0.7",
"description": "module to copy, maintain, and launch hardware modules on other machines",
"main": "src/index.js",
"bin": {
"syncu": "./bin/sync.js"
"syncu": "./bin/sync-cli"
},
"scripts": {
"sync": "node -r esm ./bin/sync",

View File

@ -236,6 +236,7 @@ class Sync extends merge(Rsync, Emitter) {
}
if (errors) log.warn({errors: errors, cmd:cmd, msg:'sync ran but with with errors'})
log.info({cmd:cmd, status:status, msg:'sync run'})
if (!errors) this.emit('sync',status)
resolve({cmd:cmd, errors:errors, status:status, msg:'sync run'})
}, function(data) {
status += data.toString()