Skip to content

Commit ff36835

Browse files
committed
fix bash
1 parent 8001c00 commit ff36835

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

helper-functions/tests/files-exist.nf

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,20 @@ process filesExist {
6060
if [[ "${expect}" = "exist" ]]; then
6161
for f in \$(echo "${file_name_arg}"); do
6262
if [[ ! -f \$f ]]; then
63-
exit "Expected \$f not exists."
63+
echo "Expected \$f not exists."
64+
exit 1
6465
fi
6566
done
6667
elif [[ "${expect}" = "not_exist" ]]; then
6768
for f in \$(echo "${file_name_arg}"); do
6869
if [[ -f \$f ]]; then
69-
exit "Unexpected \$f exists."
70+
echo "Unexpected \$f exists."
71+
exit 1
7072
fi
7173
done
7274
else
73-
exit "Second argument must be either 'exist' or 'not_exist'. '${expect}' is supplied."
75+
echo "Second argument must be either 'exist' or 'not_exist'. '${expect}' is supplied."
76+
exit 1
7477
fi
7578
"""
7679
}

0 commit comments

Comments
 (0)