Skip to content

Commit

Permalink
fix problem in high-verbosity mode
Browse files Browse the repository at this point in the history
Add an if-clause to verify the existence of `article_info_file` before trying to `cat` the file to prevent errors when no `article_info_file` is specified by the user.
  • Loading branch information
AAriam authored and tarleb committed Dec 27, 2024
1 parent 9e47f8a commit 31ffd1e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scripts/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,12 @@ if [ "$verbosity" -ge 1 ]; then
printf 'article_info_option : %s\n' "${article_info_option}"
fi
if [ "$verbosity" -ge 2 ]; then
printf "\nContent of metadata defaults file:\n"
cat "${article_info_file}"
if [ -n "${article_info_file}" ] && [ -f "${article_info_file}" ]; then
printf "\nContent of metadata defaults file:\n"
cat "${article_info_file}"
else
printf "No valid metadata defaults file specified.\n"
fi
fi

# All paths in the document are expected to be relative to the paper
Expand Down

0 comments on commit 31ffd1e

Please sign in to comment.