Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bin/safeRun.sh: Fix try: not found bug #4935

Merged
merged 1 commit into from
Mar 10, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/bin/safeRun.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ fatal() { error "$@"; exit 1; }
LAST_EMAIL_SEND=0

# Move to the Etherpad base directory.
MY_DIR=$(try cd "${0%/*}" && try pwd -P) || exit 1
try cd "${MY_DIR}/../.."
MY_DIR=$(cd "${0%/*}" && pwd -P) || exit 1
cd "${MY_DIR}/../.." || exit 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cd "${MY_DIR}/../.." || exit 1
cd "${MY_DIR}/../.." || fatal "Couldn't go to ${MY_DIR}/../.."

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise, looks good to me. Thanks!

Copy link
Member Author

@rhansen rhansen Mar 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather define try in this file than use fatal. I'm doing neither to fix this bug because I prefer consistency with the other scripts in this same directory. (That cd should never fail anyway.)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem 🙂


# Check if a logfile parameter is set
LOG="$1"
Expand Down