Skip to content
Snippets Groups Projects
Commit 00e21bfd authored by Andrew Janke's avatar Andrew Janke
Browse files

brew: Conciser error when run from nonexistent directory

parent e4c02faf
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
set +o posix
# Fail fast with concise message when cwd does not exist
if ! [[ -d "$PWD" ]]; then
echo "Error: The current working directory doesn't exist, cannot proceed." >&2
exit 1
fi
quiet_cd() {
cd "$@" >/dev/null
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment