You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When I start my casa-dev env, the following error message occurs : /.singularity.d/runscript: 91: /home/souedet/.bashrc: Bad substitution
The error is because dash is the default shell in our containers (/bin/sh is a link to /bin/dash).
So it forbids to add bash only compatible expressions like : '[[ -z "" ]] && echo hello'
To Reproduce
Steps to reproduce the behavior:
Edit your ~/.bashrc
Append a bash compatible line but not dash compatible '[[ -z "" ]] && echo pouet'
Starts your container : bv bash
See error
Expected behavior
I think that ~/.bashrc should allow to contain compatible bash expressions when we start our casa-dev container.
Environment:
Engine: Apptainer
Version of BrainVISA: master branch
Version of the casa-dev image: casa-dev-5.3-28
Additional context
To solve the issue we should reconfigure dash package to not be the default shell.
The following code should be added to casa-dev receipe:
(no pouet).
Normally the .bashrc is only called when running a bash shell...
Or, I have an hypothesis:
do you have a .profile in your env home, which explicitly sources the .bashrc ? If so it's the reason: .profile is sourced by all sh shell variants, thus should not contain bash-specific or source bash-specific code. Otherwise you can use .bash_profile instead of .profile.
Describe the bug
When I start my casa-dev env, the following error message occurs :
/.singularity.d/runscript: 91: /home/souedet/.bashrc: Bad substitution
The error is because dash is the default shell in our containers (/bin/sh is a link to /bin/dash).
So it forbids to add bash only compatible expressions like :
'[[ -z "" ]] && echo hello'
To Reproduce
Steps to reproduce the behavior:
~/.bashrc
'[[ -z "" ]] && echo pouet'
bv bash
Expected behavior
I think that ~/.bashrc should allow to contain compatible bash expressions when we start our casa-dev container.
Environment:
Additional context
To solve the issue we should reconfigure dash package to not be the default shell.
The following code should be added to casa-dev receipe:
The text was updated successfully, but these errors were encountered: