Skip to content

Commit

Permalink
Merge pull request #1079 from INCATools/check-for-spaces-in-pwd
Browse files Browse the repository at this point in the history
run.sh: Check for spaces in the path to the current directory.
  • Loading branch information
gouttegd authored Jul 4, 2024
2 parents a6cd834 + 30f81d7 commit 24b87a3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions template/src/ontology/run.sh.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@

set -e

# Check for spaces in the current directory path
for item in $PWD ; do
if [ "$item" != "$PWD" ]; then
echo "${0##*/}: error: repository path must not contain whitespace characters" >&2
exit 1
fi
done

if [ -f run.sh.conf ]; then
. ./run.sh.conf
fi
Expand Down

0 comments on commit 24b87a3

Please sign in to comment.