Containerize: accommodate nested or pre-existing spack-env paths (#41558)
The current `mkdir {{ paths.environment }}` will generate an error if: * `{{ paths.environment }}` already exists, or * `{{ paths.environment }}` is nested in non-existing dirs. Adding `-p` to the command will make this robust to both possibilities. Set noclobber bash option when writing manifest.
This commit is contained in:
parent
000fe1b5a1
commit
64d046100a
1 changed files with 2 additions and 1 deletions
|
@ -16,7 +16,8 @@ RUN {% if os_package_update %}{{ os_packages_build.update }} \
|
||||||
|
|
||||||
# What we want to install and how we want to install it
|
# What we want to install and how we want to install it
|
||||||
# is specified in a manifest file (spack.yaml)
|
# is specified in a manifest file (spack.yaml)
|
||||||
RUN mkdir {{ paths.environment }} \
|
RUN mkdir -p {{ paths.environment }} && \
|
||||||
|
set -o noclobber \
|
||||||
{{ manifest }} > {{ paths.environment }}/spack.yaml
|
{{ manifest }} > {{ paths.environment }}/spack.yaml
|
||||||
|
|
||||||
# Install the software, remove unnecessary deps
|
# Install the software, remove unnecessary deps
|
||||||
|
|
Loading…
Reference in a new issue