Go

Go on z/OS

Go on z/OS

This group is a space for open discussions and sharing technical information, and also provides a connection to the wider Go open source community for anyone who is interested in Go on z/OS

 View Only
  • 1.  envsetup script corrupts SHELL environment variable

    Posted Tue February 21, 2023 02:57 AM

    When bash is set as the default shell the envsetup script corrupts the SHELL environment variable.  Before running the envsetup script the SHELL environment variable is set to the fully qualified path to the bash executable.  However, after envsetup is run in the .bash_profile the SHELL environment variable is set to -bash.  This then causes other scripts that rely on a valid SHELL environment variable to fail.

    What is the reason for the envsetup script modifying the SHELL environment variable?



    ------------------------------
    Paul Stewart
    ------------------------------


  • 2.  RE: envsetup script corrupts SHELL environment variable

    Posted Tue February 21, 2023 05:31 PM

    Hi. This may occur if your login shell is set to bash. Suggestion: there is a single line in the environment setup script: "export SHELL=$0" that can be deleted. If you delete this line, does it solve the problem?



    ------------------------------
    Bill O'Farrell
    Team Lead, Go on z/OS
    ------------------------------



  • 3.  RE: envsetup script corrupts SHELL environment variable

    Posted Thu February 23, 2023 01:29 PM

    Hello Paul,

    Did deleting export SHELL=$0 resolve your issue?



    ------------------------------
    Hyder Naqvi
    ------------------------------



  • 4.  RE: envsetup script corrupts SHELL environment variable

    Posted Thu February 23, 2023 01:34 PM

    Hello Hyder,

    I saved and restored the SHELL environment variable to resolve the issue.  There is an update that will be released to permanently fix the issue.



    ------------------------------
    Paul Stewart
    ------------------------------