RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1654989 - zsh return 0 on parse error
Summary: zsh return 0 on parse error
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: zsh
Version: 8.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Kamil Dudka
QA Contact: Jakub Heger
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-30 09:43 UTC by Jakub Heger
Modified: 2019-06-13 23:59 UTC (History)
1 user (show)

Fixed In Version: zsh-5.5.1-6.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-06-13 23:59:54 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jakub Heger 2018-11-30 09:43:50 UTC
Description of problem:
When zsh encounters parse error in a script it return 0 (successful) code. It should return 1 or other unsuccessful code.

Version-Release number of selected component (if applicable):
zsh-5.5.1-5.el8.x86_64

How reproducible:
always

Steps to Reproduce:
1. # cat test.sh
cat >> /tmp/try <<EOF
export A="$(tr '\n' ' ' <<BLDARC
content
BLDARC)"
EOF

2. # zsh test.sh

Actual results:
test.sh:6: parse error
# echo $?
0

Expected results:
test.sh:6: parse error
# echo $?
1

Additional info:

Comment 1 Kamil Dudka 2018-11-30 12:54:26 UTC
upstream commit:

https://github.com/zsh-users/zsh/commit/ef204253

Comment 2 Kamil Dudka 2018-11-30 16:13:14 UTC
Fixed in the following Fedora builds for now:

    zsh-5.6.2-3.fc30
    zsh-5.6.2-3.fc29
    zsh-5.5.1-4.fc28


Note You need to log in before you can comment on or make changes to this bug.