bugfix...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2020-08-16 05:14:38 +03:00
parent 258e0443e3
commit 79f6fa6e93
2 changed files with 6 additions and 6 deletions

View File

@ -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()

View File

@ -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"
}
}