File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package helm_utils
22
33import (
44 "bufio"
5+ "errors"
56 "fmt"
67 "log"
78 "os"
@@ -168,12 +169,12 @@ func GetRunfile(runfile_path string) string {
168169 // Use the runfiles library to locate files
169170 runfile , err := runfiles .Rlocation (runfile_path )
170171 if err != nil {
171- log .Fatal ("When reading file " , runfile_path , " got error " , err )
172+ log .Fatalf ("When reading file %s, got error %v" , runfile , err )
172173 }
173174
174175 // Check that the file actually exist
175- if _ , err := os .Stat (runfile ); err != nil {
176- log .Fatal ("File found by runfile doesn't exist" )
176+ if _ , err := os .Stat (runfile ); errors . Is ( err , os . ErrNotExist ) {
177+ log .Fatalf ("File %s found by runfile doesn't exist" , runfile )
177178 }
178179
179180 return runfile
You can’t perform that action at this time.
0 commit comments