File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
src/command_modules/azure-cli-acr/azure/cli/command_modules/acr Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 44# --------------------------------------------------------------------------------------------
55
66import re
7- from os .path import isdir
7+ from os .path import isdir , basename
88
99from knack .util import CLIError
1010from knack .log import get_logger
@@ -113,7 +113,8 @@ def acr_helm_push(cmd,
113113 if isdir (chart_package ):
114114 raise CLIError ("Please run 'helm package {}' to generate a chart package first." .format (chart_package ))
115115
116- if not re .match (VALID_NAME , chart_package ):
116+ chart_name = basename (chart_package )
117+ if not re .match (VALID_NAME , chart_name ):
117118 raise CLIError ("Invalid helm package name '{}'. Is it a '*.tgz' or '*.tgz.prov' file?" .format (chart_package ))
118119
119120 login_server , username , password = get_access_credentials (
@@ -130,7 +131,7 @@ def acr_helm_push(cmd,
130131 return request_data_from_registry (
131132 http_method = 'patch' if force else 'put' ,
132133 login_server = login_server ,
133- path = _get_blobs_path (repository , chart_package ),
134+ path = _get_blobs_path (repository , chart_name ),
134135 username = username ,
135136 password = password ,
136137 data_payload = input_file ,
You can’t perform that action at this time.
0 commit comments