Open mgrossmann opened 1 year ago
. ./.env
./.env:1: parse error near `)'
This is strange, when you ran the above command was .env in the current working directory? What shell are you using?
For the missing commands, I don't see why it shouldn't work, unless your shell is evaluating PATH before calling sanitizeEnvvar()?
# Environment variables
PATH=\$ZOPEN_ROOTFS/usr/bin:\$ZOPEN_ROOTFS/bin:\$ZOPEN_ROOTFS/boot:\$(sanitizeEnvVar \"\$PATH\" \":\" \"^\$ZOPEN_PKGINSTALL/.*\$\")
Are you able to add a set -x to zopen-config and provide the output?
Hello @IgorTodorovskiIBM
First things first. Using /bin/sh lets me install everything just fine. In my case, I'm using the ZSH. But BASH will behave in the same way, I'm pretty sure. I will test it tomorrow. In the meantime, I found the problem with .zopen-config.
The ZSH built-in function echo seems to dishonor the _BPXK_AUTOCVT setting.
Issuing an echo "Hello" | more
will output garbage. Using /bin/echo | more
is working
just fine. So the sanitizeEnvvar()
produces an unpredictable output and the original $PATH
got lost in the newly built PATH variable.
Regarding the sourcing of the .env file, I actually have no idea. It looks like the ZSH dies before just executing/sourcing the file. I already have added set -x and some echo statements. The shell is always complaining about an error near ')' in line 1.
More on this, tomorrow.
Best, Mike
The 'nice shell' is an early drop of zsh ?
echo is known to not be super-portable - @IgorTodorovskiIBM perhaps that is an issue... If this is zsh, we will be able to test easier after GA of z/OS 3.1
In zsh, echo is a builtin, I wonder if the pipes are not properly tagged, because more is a ebcdic application.
I'm not sure I'm allowed but I can do tests until GA of z/OS 3.1. Just a few weeks. :)
| The 'nice shell' is an early drop of zsh ? y e s
@IgorTodorovskiIBM
more
was just an example. I also tested it as echo "Hell" | echo
or even with tee. So yes, I think the pipe produces the problem, when using the built-in.
This is what I get with zsh:
./.env:1: FSUZ0202 unmatched '
The builtins seemed to be working though for me.
@IgorTodorovskiIBM
You just tested .env or .zopen-config as well? I'm home in 20 minutes. Then I can connect to the host.
So if I could do / test anything, let me know.
@IgorTodorovskiIBM
You just tested .env or .zopen-config as well? I'm home in 20 minutes. Then I can connect to the host.
So if I could do / test anything, let me know.
I can't get past the .env issue, even by setting the PATH to its directory. I wonder if we have different versions installed.
PLPSC% zsh --version
zsh 5.8.1 (i370-ibm-openedition)
I'm currently on an older version.
MIKEG1@S0W1: ~ $ zsh --version
zsh 5.8.0.2-dev (i370-ibm-openedition)
But we will upgrade our system in the next days.
So in the end there are two problems, right?
Both are related to not using /bin/sh
as shell.
First is sourcing the .env file, second is sourcing the .zopen-config file.
The second one, is related to a pipe or echo built-in problem.
Could you please confirm the echo / pipe problem?
MIKEG1@S0W1: ~ $ echo "Hallo" 2>&1 | tee test
�/%%?�#
MIKEG1@S0W1: ~ $ cat test
�/%%?�#
vs.
MIKEG1@S0W1: ~ $ /bin/echo "Hallo" 2>&1 | tee test
Hallo
MIKEG1@S0W1: ~ $ cat test
Hallo
/MIKE
@IgorTodorovskiIBM You just tested .env or .zopen-config as well? I'm home in 20 minutes. Then I can connect to the host. So if I could do / test anything, let me know.
I can't get past the .env issue, even by setting the PATH to its directory. I wonder if we have different versions installed.
PLPSC% zsh --version zsh 5.8.1 (i370-ibm-openedition)
I din't get .env working, either. I set up the path in the manual way, without using the .env file.
The pipe issue seems to be resolved:
PLPSC% echo "Hallo" 2>&1 | tee testigor
Hallo
PLPSC% cat testigor
Hallo
PLPSC%
@IgorTodorovskiIBM , the current zsh is v5.8.1, in which the pipe issue was fixed. The output on AQ is as below:
6:50:30 ~ $echo "Hallo" 2>&1 | tee testme Hallo 6:50:37 ~ $cat testme Hallo
Sunny
Can we close @mgrossmann ?
Hello,
I tried to install version 0.6.0. My environment could not be named as of end of this month. So I'm not running bash but another nice shell.
According to the documentation I started running
So I fixed this issue by manually setting the path as in the .env script.
After installation I tried to source the new environment via:
It looks like the shell function
sanitizeEnvVar() {}
failed and afterwards $PATH is missing the new PATH variable.Thx, Mike