diff --git a/src/build/incrementality.go b/src/build/incrementality.go index eedc891fe..23577568a 100644 --- a/src/build/incrementality.go +++ b/src/build/incrementality.go @@ -483,7 +483,7 @@ func secretHash(state *core.BuildState, target *core.BuildTarget) ([]byte, error } h := sha1.New() for _, secret := range target.Secrets { - ph, err := state.PathHasher.Hash(secret, false, false, false) + ph, err := state.PathHasher.Hash(fs.ExpandHomePath(secret), false, false, false) if err != nil && os.IsNotExist(err) { return noSecrets, nil // Not having the secrets is not an error yet. } else if err != nil {