npmci/ts/mod_command/index.ts

14 lines
399 B
TypeScript
Raw Normal View History

2017-05-19 10:09:33 +00:00
import * as plugins from './mod.plugins'
import { bash } from '../npmci.bash'
2016-06-11 18:22:00 +00:00
2017-03-08 13:50:41 +00:00
export let command = async () => {
let wrappedCommand: string = ''
let argvArray = process.argv
for (let i = 3; i < argvArray.length; i++) {
wrappedCommand = wrappedCommand + argvArray[i]
if (i + 1 !== argvArray.length) { wrappedCommand = wrappedCommand + ' ' }
}
await bash(wrappedCommand)
return
2016-11-25 12:25:45 +00:00
}