Browse Source

Fixed 0 arg scenario

production
guest 2 years ago
parent
commit
61e4056e72
1 changed files with 10 additions and 2 deletions
  1. 10
    2
      cliverse.js

+ 10
- 2
cliverse.js View File

@@ -4,8 +4,16 @@ const fs = require('fs')
function nodeShellExec() {

var args = Array.from(arguments);
var opts = args[2] = args[2] || {}
opts.title ? null : opts.title = `${args[0]} ${args[1] }`
if(args.length > 1){
var opts = args[2] = args[2] || {}
opts.title ? null : opts.title = `${args[0]} ${args[1] }`
}
else {
opts = {
title : `${args[0]}`
// , inherit: true, shell: true
}
}
// // const spawn = require('child_process').spawn;
// const s = spawn(

Loading…
Cancel
Save