Skip to content

Commit aa0c1b7

Browse files
committed
Tidy up NOTES_DIRECTORY error handling
1 parent 0ba5410 commit aa0c1b7

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

notes

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,10 @@ notes_dir="${configured_dir:-$HOME/notes}"
1313
escaped_notes_dir="$(printf "$notes_dir" | sed -e 's/[]\/$*.^|[]/\\&/g')"
1414

1515
# Make sure the notes directory actually exists, and create it if it doesn't
16-
# if [ ! -d "$notes_dir" ]; then
17-
# mkdir man page says "create the Dir(s) if they donot already exist"
1816
if ! $(mkdir -p "$notes_dir"); then
19-
echo "please, set \$NOTES_DIRECTORY to a different location" >&2
17+
echo "Could not create directory $notes_dir, please update your \$NOTES_DIRECTORY" >&2
2018
exit 1
2119
fi
22-
# fi
2320

2421
# If no $EDITOR, look for `editor` (symlink on debian/ubuntu/etc)
2522
if [ -z "$EDITOR" ] && type editor &>/dev/null; then

0 commit comments

Comments
 (0)