Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nested directory creation error #1400

Closed
maflister opened this issue Mar 15, 2018 · 2 comments
Closed

nested directory creation error #1400

maflister opened this issue Mar 15, 2018 · 2 comments

Comments

@maflister
Copy link

Version of Singularity:

2.4.2

Expected behavior

Creating multiple nested directories in post section using mkdir. Expect it to follow standard bash syntax.
mkdir -p /my/nested/{dir1,dir2}
ls /my/nested
dir1 dir2

Actual behavior

mkdir -p /my/nested/{dir1,dir2}
ls /my/nested
{dir1, dir2}

Steps to reproduce behavior

Run mkdir command with nested directories in the %post section.

@guma44
Copy link

guma44 commented Mar 19, 2018

What is your base image? Recently when working with Ubuntu I had to do the shell change in the beginning of the %post to get it work:

# CHANGE DASH TO BASH
rm /bin/sh
ln -sf /bin/bash /bin/sh

Apparently, Singularity uses sh as a base shell and sh is linked to dash in eg. Ubuntu.

@dtrudg
Copy link
Contributor

dtrudg commented Nov 6, 2019

Apparently, Singularity uses sh as a base shell and sh is linked to dash in eg. Ubuntu.

This is the cause of this. Because we need to support thin containers that may not have bash we are unable to force its use.

@dtrudg dtrudg closed this as completed Nov 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants