Merge pull request #2264 from Skgland/fix-os-argv-1

Fix os:argv/1 in case the raw args contain multiple `--`
This commit is contained in:
Mark Thom
2024-01-06 15:52:53 -07:00
committed by GitHub
9 changed files with 32 additions and 3 deletions

View File

@@ -138,7 +138,8 @@ raw_argv(Argv) :-
argv(Argv) :-
can_be(list, Argv),
'$argv'(Argv0),
( append(_, ["--"|Argv], Argv0) ->
true
; Argv = []
( append(_, ["--"|Argv1], Argv0) ->
Argv = Argv1
;
Argv = []
).