cleanup filepath, no chdir

This commit is contained in:
Tyrel Souza 2019-05-14 23:55:45 -04:00 committed by Tyrel Souza
parent f3e356f314
commit b28d6f2716
No known key found for this signature in database
GPG Key ID: 5A9394D4C30AEAC0

View File

@ -20,10 +20,11 @@ func verifyTideliftYamlExists(directory string) bool {
} }
func passesMinimumRequirements(directory string) string { func passesMinimumRequirements(directory string) string {
os.Chdir(directory)
filename, _ := filepath.Abs("./.tidelift.yml") filename, _ := filepath.Abs(fmt.Sprintf("%s/.tidelift.yml", directory))
yamlFile, err := ioutil.ReadFile(filename) yamlFile, err := ioutil.ReadFile(filename)
check(err) check(err)
type TideliftYML struct { type TideliftYML struct {
@ -34,6 +35,7 @@ func passesMinimumRequirements(directory string) string {
var yml TideliftYML var yml TideliftYML
err = yaml.Unmarshal(yamlFile, &yml) err = yaml.Unmarshal(yamlFile, &yml)
check(err) check(err)
// Check for Team name // Check for Team name