func locateChartPath(name string, verify bool, keyring string) (string, error) {
	if fi, err := os.Stat(name); err == nil {
		abs, err := filepath.Abs(name)
		if err != nil {
			return abs, err
		}
		if verify {
			if fi.IsDir() {
				return "", errors.New("cannot verify a directory")
			}
			if err := verifyChart(abs, keyring); err != nil {
				return "", err
			}
		}
		return abs, nil
	}
	if filepath.IsAbs(name) || strings.HasPrefix(name, ".") {
		return name, fmt.Errorf("path %q not found", name)
	}

	crepo := filepath.Join(repositoryDirectory(), name)
	if _, err := os.Stat(crepo); err == nil {
		return filepath.Abs(crepo)
	}

	// Try fetching the chart from a remote repo into a tmpdir
	origname := name
	if filepath.Ext(name) != ".tgz" {
		name += ".tgz"
	}
	if err := downloadChart(name, false, ".", verify, keyring); err == nil {
		lname, err := filepath.Abs(filepath.Base(name))
		if err != nil {
			return lname, err
		}
		fmt.Printf("Fetched %s to %s\n", origname, lname)
		return lname, nil
	}

	return name, fmt.Errorf("file %q not found", origname)
}
// locateChartPath looks for a chart directory in known places, and returns either the full path or an error.
//
// This does not ensure that the chart is well-formed; only that the requested filename exists.
//
// Order of resolution:
// - current working directory
// - if path is absolute or begins with '.', error out here
// - chart repos in $HELM_HOME
//
// If 'verify' is true, this will attempt to also verify the chart.
locateChartPath looks for a chart directory in known places, and returns either the full path or an error.

This does not ensure that the chart is well-formed; only that the requested filename exists.

Order of resolution:
- current working directory
- if path is absolute or begins with '.', error out here
- chart repos in $HELM_HOME

If 'verify' is true, this will attempt to also verify the chart.
// locateChartPath looks for a chart directory in known places and returns either the full path or an error . // // This does not ensure that the chart is well - formed ; only that the requested filename exists . // // Order of resolution : // - current working directory // - if path is absolute or begins with ' . ' error out here // - chart repos in $HELM_HOME // // If ' verify ' is true this will attempt to also verify the chart .
func locateChartPath(name string, verify bool, keyring string) (string, error) {
	if fi, err := os.Stat(name); err == nil {
		abs, err := filepath.Abs(name)
		if err != nil {
			return abs, err
		}
		if verify {
			if fi.IsDir() {
				return "", errors.New("cannot verify a directory")
			}
			if err := verifyChart(abs, keyring); err != nil {
				return "", err
			}
		}
		return abs, nil
	}
	if filepath.IsAbs(name) || strings.HasPrefix(name, ".") {
		return name, fmt.Errorf("path %q not found", name)
	}
	crepo := filepath.Join(repositoryDirectory(), name)
	if _, err := os.Stat(crepo); err == nil {
		return filepath.Abs(crepo)
	}
	origname := name
	if filepath.Ext(name) != ".tgz" {
		name += ".tgz"
	}
	if err := downloadChart(name, false, ".", verify, keyring); err == nil {
		lname, err := filepath.Abs(filepath.Base(name))
		if err != nil {
			return lname, err
		}
		fmt.Printf("Fetched %s to %s\n", origname, lname)
		return lname, nil
	}
	return name, fmt.Errorf("file %q not found", origname)
}
func locateChartPath ( name string , verify bool , keyring string ) ( string , error ) { if fi , err := os . Stat ( name ) ; err == nil { abs , err := filepath . Abs ( name ) if err != nil { return abs , err } if verify { if fi . IsDir ( ) { return " " , errors . New ( " " ) } if err := verifyChart ( abs , keyring ) ; err != nil { return " " , err } } return abs , nil } if filepath . IsAbs ( name ) || strings . HasPrefix ( name , " " ) { return name , fmt . Errorf ( " " , name ) } crepo := filepath . Join ( repositoryDirectory ( ) , name ) if _ , err := os . Stat ( crepo ) ; err == nil { return filepath . Abs ( crepo ) } origname := name if filepath . Ext ( name ) != " " { name += " " } if err := downloadChart ( name , false , " " , verify , keyring ) ; err == nil { lname , err := filepath . Abs ( filepath . Base ( name ) ) if err != nil { return lname , err } fmt . Printf ( " \n " , origname , lname ) return lname , nil } return name , fmt . Errorf ( " " , origname ) }
locateChartPath looks for a chart directory in known places, and returns either the full path or an error.
locateChartPath looks for a chart directory in known places and returns either the full path or an error .
// Try fetching the chart from a remote repo into a tmpdir