Skip to content

Commit aa31e15

Browse files
committed
do an ls on the original subdirs of the installation dir to work around permission issues (instead of recreating them)
1 parent 8d5ef69 commit aa31e15

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

EESSI-remove-software.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,12 @@ if [ $EUID -eq 0 ]; then
130130
echo_yellow "Removing ${app_dir} and ${app_module}..."
131131
rm -rf ${app_dir}
132132
rm -rf ${app_module}
133-
# recreate the installation directories and first-level subdirectories to work around permission denied
134-
# issues when rebuilding the package (see https://github.com/EESSI/software-layer/issues/556)
133+
# recreate the installation directory and do an ls on the first-level subdirectories to work around
134+
# permission denied issues when rebuilding the package (see https://github.com/EESSI/software-layer/issues/556)
135135
echo_yellow "Recreating an empty ${app_dir}..."
136136
mkdir -p ${app_dir}
137137
for app_subdir in ${app_subdirs}; do
138-
mkdir -p ${app_subdir}
138+
ls ${app_subdir} >& /dev/null || true
139139
done
140140
done
141141
else

0 commit comments

Comments
 (0)