Skip to content

Commit

Permalink
fix: allow use without @ if file path is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
aslafy-z authored Jul 7, 2024
1 parent 42628dd commit f3365f4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions helm-git-plugin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -293,10 +293,13 @@ main() {
error "$error_invalid_protocol"

git_repo_path=$(echo "${_uri_path}" | cut -d'@' -f 1)
git_file_path=$(echo "${_uri_path}" | cut -d'@' -f 2)
if [ -z "$git_file_path" ]; then
git_file_path=$(basename "$git_repo_path")
git_repo_path=$(dirname "$git_repo_path")
fi
readonly git_repo_path
trace "git_repo_path: $git_repo_path"

git_file_path=$(echo "${_uri_path}" | cut -d'@' -f 2)
readonly git_file_path
trace "git_file_path: $git_file_path"

Expand Down

0 comments on commit f3365f4

Please sign in to comment.