os-patches
os-patches copied to clipboard
Provide a patch for "Process exited with errors" notification
What Happened?
Looking at the code it looks like Terminal sends an error notification when the executed command failed:
https://github.com/elementary/terminal/blob/d76a388fc3327007724414efe4418bb829c42bdf/src/Application.vala#L161-L164
However, I've never seen this and instead I always see the successful notification even if the executed command failed.
Steps to Reproduce
- Open Terminal
- Run the following command:
sleep 3; false - Make the Terminal background so that it sends notification after executing the command
- See the successful notification is shown
- Go back to Terminal and run
echo $? - See
1(which commonly means error) is shown
Expected Behavior
Error notification should be shown instead of the successful notification if the executed command returned non-0 value.
OS Version
7.x (Horus)
Software Version
Latest release (I have run all updates)
Log Output
N/A
Hardware Info
- CPU: AMD Ryzen 5 3400G
- RAM: 16 GB
- Graphics: iGPU
- Storage: 490 GB NVMe SSD
The code that trigger the notfication is this: https://github.com/elementary/terminal/blob/d76a388fc3327007724414efe4418bb829c42bdf/src/Widgets/TerminalWidget.vala#L71-L77
$__bp_last_ret_value was provided by a patch in bash that i believe we don't apply anymore.
Thank you for your information. So, we need to set up the bash-jammy branch with that patch (and Launchpad too if needed) to fix this issue.
@tintou Would you take a look at this because you often work on os-patches repository?
Just waiting to see if it builds okay: https://code.launchpad.net/~elementary-os/+recipe/bash-noble
Patch built and issue confirmed fix! https://code.launchpad.net/~elementary-os/+archive/ubuntu/os-patches/+packages?field.name_filter=bash&field.status_filter=published&field.series_filter=