Bug 21624 – Typo in `--DRT` or using `help` does not make the program exit

Status
NEW
Severity
minor
Priority
P3
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-02-09T09:18:20Z
Last change time
2024-12-07T13:40:59Z
Assigned to
No Owner
Creator
Mathias LANG
Moved to GitHub: dmd#17421 →

Comments

Comment #0 by pro.mathias.lang — 2021-02-09T09:18:20Z
It is a common expectation for users that using `--help` on a program will *NOT* start the program. Likewise, when a user makes a typo in the arguments passed to a program, the program should *NOT* start. The arguments parsing in DRuntime doesn't do any of this. `--DRT-gcopts=foo` (notice the extra 's' after `gcopt`) will happily run the program, and so will `--DRT-gcopt=help`.
Comment #1 by robert.schadek — 2024-12-07T13:40:59Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17421 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB