fix golangci-lint issues

Signed-off-by: Alik Khilazhev <7482065+alikhil@users.noreply.github.com>
pull/30855/head
Alik Khilazhev 3 months ago
parent 2e127afae9
commit 3eef4664f9
No known key found for this signature in database
GPG Key ID: 141EBCECAE009661

@ -165,18 +165,6 @@ func resetEnv() func() {
}
}
func testChdir(t *testing.T, dir string) func() {
t.Helper()
old, err := os.Getwd()
if err != nil {
t.Fatal(err)
}
if err := os.Chdir(dir); err != nil {
t.Fatal(err)
}
return func() { os.Chdir(old) }
}
// resetChartDependencyState completely resets dependency state of a given chart
// by deleting `Chart.lock` and `charts/`.
//

@ -825,14 +825,12 @@ func (m *Manager) locateLocalDependencies(baseChartPath string, resursive bool)
for _, chartDependency := range baseChart.Metadata.Dependencies {
fullDepChartPath := chartDependency.Repository
if strings.HasPrefix(
chartDependency.Repository,
"file://",
) {
fullDepChartPath, err = filepath.Abs(
fullDepChartPath, err := filepath.Abs(
fmt.Sprintf(
"%s/%s",
baseChartPath, chartDependency.Repository[7:]), // removes "file://"

Loading…
Cancel
Save