GNU GRUB - Bugs: bug #65154, unkown commands exit with zero
You are not allowed to post comments on this tracker with your current authentication level.
bug #65154: unkown commands exit with zero
Submitter: | Itxaka Serrano <itxaka> | ||
Submitted: | Fri 12 Jan 2024 04:52:54 PM UTC | ||
Category: | Terminal | Severity: | Major |
Priority: | 5 - Normal | Item Group: | Software Error |
Status: | None | Privacy: | Public |
Assigned to: | None | Originator Name: | |
Open/Closed: | Open | Release: | other |
Release: | Reproducibility: | Every Time | |
Planned Release: | None |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
Carbon-Copy List
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
No changes have been made to this item
Powered by Savane 3.13-02a9.
Corresponding source code
Version: 2.06
Issue: Any command that its unknown will result in a zero exit code which is confusing
Example:
grub> hello
error: ../../grub-core/script/function.c:119:can't find command `hello'.
grub> echo $?
0
Kind of weird because on the code it seems like its returning a GRUB_ERR_UNKNOWN_COMMAND which should not be zero. I had a quick look and maybe its becuase on line 1018 of grub-core/script/execute.c we print the error but always return 0 https://git.savannah.gnu.org/cgit/grub.git/tree/grub-core/script/execute.c#n1018
What I would expect: Any command that does not exists to return a different exit code than zero