Re: Cannot run `git submodule init` on Cygwin from script with strict error checking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 11, 2020 at 1:30 PM Adam Dinwoodie <adam@xxxxxxxxxxxxx> wrote:
>
> Hi Jędrzej,

> I think there's something odd about the way you're calling `git
> submodule init`: it should normally be a separate execution that
> wouldn't inherit the `-aeu` or `-x` settings from the parent Bash
> process.

Sorry for not including the test script. Here it is:

----8<----8<----8<-- CUT HERE--8<----8<----8<----8<----
#!/bin/bash

set -aeu

export SHELLOPTS

set -x

git submodule init
----8<----8<----8<-- CUT HERE--8<----8<----8<----8<----

I use "export SHELLOPTS" because I want these flags to be effective in
subshells. As a workaround I'm currently calling "set +u" before each
execution of "git submodule init" and my script works, but it isn't
very nice and IMHO shouldn't be required (i.e. it would be extremely
nice if someone fixed it).
-- 
Jędrzej Dudkiewicz

I really hate this damn machine, I wish that they would sell it.
It never does just what I want, but only what I tell it.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux