add check to make sure fingerprint file isn't empty (#1714)

This commit is contained in:
henrygd
2026-02-04 20:05:07 -05:00
parent 5452e50080
commit 2a3885a52e

View File

@@ -238,7 +238,9 @@ func (a *Agent) getFingerprint() string {
// first look for a fingerprint in the data directory
if a.dataDir != "" {
if fp, err := os.ReadFile(filepath.Join(a.dataDir, "fingerprint")); err == nil {
return string(fp)
if s := strings.TrimSpace(string(fp)); s != "" {
return s
}
}
}