[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #65154] unkown commands exit with zero
From: |
Itxaka Serrano |
Subject: |
[bug #65154] unkown commands exit with zero |
Date: |
Fri, 12 Jan 2024 11:52:54 -0500 (EST) |
URL:
<https://savannah.gnu.org/bugs/?65154>
Summary: unkown commands exit with zero
Group: GNU GRUB
Submitter: 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:
Originator Email:
Open/Closed: Open
Release: other
Release:
Discussion Lock: Any
Reproducibility: Every Time
Planned Release: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Fri 12 Jan 2024 04:52:54 PM UTC By: Itxaka Serrano <itxaka>
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
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?65154>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug #65154] unkown commands exit with zero,
Itxaka Serrano <=