Fail on non-existing ccache

This commit is contained in:
Erik Geiser
2025-11-07 10:15:56 +01:00
parent b58e100640
commit 4ae65c2ac3
+6 -2
View File
@@ -262,9 +262,13 @@ func (opts *Options) preliminaryCredential() (*Credential, error) {
if opts.CCache != "" {
s, err := os.Stat(opts.CCache)
if err == nil && !s.IsDir() {
ccache = opts.CCache
if err != nil {
return nil, fmt.Errorf("stat CCache path: %w", err)
} else if s.IsDir() {
return nil, fmt.Errorf("CCache path is a directory: %s", opts.CCache)
}
ccache = opts.CCache
}
cred := &Credential{