Skip to content

Commit

Permalink
Merge pull request #301 from JaZo/patch-1
Browse files Browse the repository at this point in the history
fix: [#268] do not validate URL when skip flag is used
  • Loading branch information
patrick330602 committed Mar 10, 2024
2 parents 37da694 + 060b047 commit 4ee2c0c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/wslview.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,12 @@ if [[ "$lname" != "" ]]; then
properfile_full_path="$(readlink -f "${lname}")"
fi
debug_echo "properfile_full_path: $properfile_full_path"
debug_echo "validating whether if it is a link"
is_valid_url=$(url_validator "$lname")
if [ "$skip_validation_check" -eq 0 ]; then
debug_echo "Skipping validation check"
is_valid_url=0
else
debug_echo "Validating whether if it is a link"
is_valid_url=$(url_validator "$lname")
fi
if [[ "$is_valid_url" -eq 0 ]] && [ -z "$properfile_full_path" ]; then
debug_echo "It is a link"
Expand Down

0 comments on commit 4ee2c0c

Please sign in to comment.