>> $user= $opt_u|| $ENV{USER}|| $ENV{USERNAME}|| Win32::LoginName();
>
> I agree that doesn't look terribly robust, but for a Linux environment
> to not define $USER seems rather unusual. Does this one-liner output the
> username correctly?
> perl -e 'printf "%s\n", getlogin();’
That also results in a blank.
> I'm wondering why you're using makeBaseApp.pl from inside a docker
> container, and why it isn't setting $USER, but that's more from curiosity...
I was playing with different ways of using Docker to containerise an EPICS installation, and in one of my experiments I tried using makeBaseApp.pl and discovered this.
To be honest, I don’t think that this would be the best way of using Docker for this task, but I thought that it was worth reporting something that looked like a bit of a weakness in makeBaseApp.
I’d be happy to make a suggested fix and submit a pull request via Git if that’s ok with you?
Steve
|