Skip to content

Commit

Permalink
checks for success on cd and ln; replaced echo by printf
Browse files Browse the repository at this point in the history
  • Loading branch information
mfhepp committed Jan 27, 2024
1 parent d4de966 commit 6d0bce8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cdf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ _cdf_check_environment() {

# Function to check if name for shortcut is a safe name for the symbolic link
_validate_basename() {
local input=$1
local input="$1"
if [ -z "$input" ]; then
# echo "ERROR: Argument is empty."
return 1
Expand Down Expand Up @@ -83,7 +83,7 @@ addfav() {
# Check if we are INSIDE a symbolic link
elif [ "$CURRENT_DIR" != $(realpath $CURRENT_DIR) ]; then
printf "ERROR: You cannot create shortcuts to symbolic links\n"
printf "Hint: $CURRENT_DIR expands to $(realpath $CURRENT_DIR)\n"
printf "Hint: $CURRENT_DIR expands to $(realpath "$CURRENT_DIR")\n"
return 1
fi
# Check if argument is a valid basename
Expand Down

0 comments on commit 6d0bce8

Please sign in to comment.