Skip to content

Commit

Permalink
fix: [#268] do not validate URL when skip flag is used
Browse files Browse the repository at this point in the history
  • Loading branch information
JaZo committed Jan 11, 2024
1 parent 2cc1c20 commit 060b047
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 060b047

Please sign in to comment.