1
0
mirror of https://github.com/helm/chart-testing.git synced 2026-02-05 18:45:18 +01:00

Log invalid chart dirs to stderr (#290)

If directories are deleted from a chart, ct detects them as invalid
chart directories. A log message is printed to stdout which messes up
the regular output. In order to fix this, the message is now logged to
stderr.

*Example:*

```
$ ct list-changed
Directory 'charts/mychart/templates/deleted' is not a valid chart directory. Skipping...
charts/mychart
```

Signed-off-by: Reinhard Nägele <unguiculus@gmail.com>
This commit is contained in:
Reinhard Nägele
2020-10-29 15:02:17 +01:00
committed by GitHub
parent e287de0bec
commit 2407e7df46

View File

@@ -17,6 +17,7 @@ package chart
import (
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strings"
@@ -729,7 +730,7 @@ func (t *Testing) ComputeChangedChartDirectories() ([]string, error) {
changedChartDirs = append(changedChartDirs, chartDir)
}
} else {
fmt.Printf("Directory '%s' is not a valid chart directory. Skipping...\n", dir)
fmt.Fprintf(os.Stderr, "Directory '%s' is not a valid chart directory. Skipping...\n", dir)
}
}