This is the mail archive of the
cygwin
mailing list for the Cygwin project.
RE: Bug: bash -e misbehaves with several nested
- From: Pavel Fedin <p dot fedin at samsung dot com>
- To: 'Marco Atzeri' <marco dot atzeri at gmail dot com>, cygwin at cygwin dot com
- Date: Thu, 25 May 2017 12:57:36 +0300
- Subject: RE: Bug: bash -e misbehaves with several nested
- Authentication-results: sourceware.org; auth=none
- Cms-type: 201P
- References: <CGME20170524125429eucas1p1384ad5e0c60eb4974a0f57e0f0203d9a@eucas1p1.samsung.com> <000e01d2d48c$e16d1ca0$a44755e0$@samsung.com> <be033564-acfc-1d1a-bc4c-9cbbb73b155f@gmail.com>
Hello!
> > Hello! I'd like to report a strange bug in 64-bit bash. The following script:
> >
> > ---- cut ---
> > #/bin/bash -e
> >
> > DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
> > echo Works: $DIR
> > ---- cut ---
> >
> > Simply exits and produces no output (never reaches echo). The same script works perfectly
> on 32 bits. Versions are the same:
> >
> > --- cut ---
>
> It works fine for me.
>
> $ ./prova.bash
> Works: /tmp
Huh, works here too, indeed. But there's one little thing. If you just copypasted this from my email, then you probably miss "#!"
(there's just "#", since i retyped the header, and made a typo). And with this typo it really works for some reason. Could you make
sure once again ?
Apparently it has to do with -e switch.
Kind regards,
Pavel Fedin
Senior Engineer
Samsung Electronics Research center Russia
> -----Original Message-----
> From: cygwin-owner@cygwin.com [mailto:cygwin-owner@cygwin.com] On Behalf Of Marco Atzeri
> Sent: Wednesday, May 24, 2017 8:41 PM
> To: cygwin@cygwin.com
> Subject: Re: Bug: bash -e misbehaves with several nested
>
> On 24/05/2017 14:54, Pavel Fedin wrote:
> > Hello! I'd like to report a strange bug in 64-bit bash. The following script:
> >
> > ---- cut ---
> > #/bin/bash -e
> >
> > DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
> > echo Works: $DIR
> > ---- cut ---
> >
> > Simply exits and produces no output (never reaches echo). The same script works perfectly
> on 32 bits. Versions are the same:
> >
> > --- cut ---
>
> It works fine for me.
>
> $ ./prova.bash
> Works: /tmp
>
>
> $ uname -svr
> CYGWIN_NT-6.1 2.8.0(0.309/5/3) 2017-04-01 20:47
>
>
> --
> Problem reports: http://cygwin.com/problems.html
> FAQ: http://cygwin.com/faq/
> Documentation: http://cygwin.com/docs.html
> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
>
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple