@ -118,6 +118,7 @@ type ChartPathOptions struct {
Keyring string // --keyring
Password string // --password
PassCredentialsAll bool // --pass-credentials
RemoteRepo bool // --remote-repo
RepoURL string // --repo
Username string // --username
Verify bool // --verify
@ -727,8 +728,8 @@ func (c *ChartPathOptions) LocateChart(name string, settings *cli.EnvSettings) (
}
name = strings . TrimSpace ( name )
version := strings . TrimSpace ( c . Version )
if ! c . RemoteRepo {
if _ , err := os . Stat ( name ) ; err == nil {
abs , err := filepath . Abs ( name )
if err != nil {
@ -744,6 +745,13 @@ func (c *ChartPathOptions) LocateChart(name string, settings *cli.EnvSettings) (
if filepath . IsAbs ( name ) || strings . HasPrefix ( name , "." ) {
return name , errors . Errorf ( "path %q not found" , name )
}
}
return c . locateRemoteChart ( name , settings )
}
func ( c * ChartPathOptions ) locateRemoteChart ( name string , settings * cli . EnvSettings ) ( string , error ) {
version := strings . TrimSpace ( c . Version )
dl := downloader . ChartDownloader {
Out : os . Stdout ,