mirror of
https://github.com/flynx/argv.js.git
synced 2025-10-28 18:30:07 +00:00
bugfix...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
258e0443e3
commit
79f6fa6e93
8
argv.js
8
argv.js
@ -967,10 +967,10 @@ object.Constructor('Parser', {
|
||||
main = context.scriptName +' '+ main
|
||||
rest.unshift(main) }
|
||||
// normalize the argv...
|
||||
if(main != null){
|
||||
rest.splice(0, rest.indexOf(main))
|
||||
rest.includes(main)
|
||||
|| rest.unshift(main) }
|
||||
if(main != null && rest[0] == process.execPath){
|
||||
rest.splice(0, 2)
|
||||
rest.unshift(main) }
|
||||
|
||||
// script stuff...
|
||||
var script = parsed.script = rest.shift()
|
||||
var basename = script.split(/[\\\/]/).pop()
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ig-argv",
|
||||
"version": "2.13.0",
|
||||
"version": "2.13.1",
|
||||
"description": "simple argv parser",
|
||||
"main": "argv.js",
|
||||
"scripts": {
|
||||
@ -24,6 +24,6 @@
|
||||
"homepage": "https://github.com/flynx/argv.js#readme",
|
||||
"dependencies": {
|
||||
"colors": "^1.4.0",
|
||||
"ig-object": "^5.1.15"
|
||||
"ig-object": "^5.2.6"
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user