Skip to content

Commit 829bb22

Browse files
jjtoltonclaude
andcommitted
Fix bug where -t argument was processed as filename
Fixed issue where `scryer-prolog -t halt` would try to load "halt.pl" as a file instead of just using halt as the custom toplevel. The bug was caused by an extra clause `delegate_task([], []).` that would return control to the calling context instead of continuing to start_toplevel. This caused the argument processing in delegate_task to continue and treat the already-consumed toplevel argument as a filename. Removing this clause ensures that delegate_task([], Goals0) always proceeds to load initialization files and start the toplevel, fixing the double-processing bug. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 7142b15 commit 829bb22

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/toplevel.pl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@
7171
arg_consults_goals(g(Goal), Args, Consults, [g(Goal)|Goals]) :-
7272
args_consults_goals(Args, Consults, Goals).
7373

74-
delegate_task([], []).
7574
delegate_task([], Goals0) :-
7675
(\+ disabled_init_file -> load_scryerrc ; true),
7776
reverse(Goals0, Goals1),

0 commit comments

Comments
 (0)