More query fixes

This commit is contained in:
crschnick 2024-02-22 17:25:19 +00:00
parent 12e4ccb995
commit dd374e17c8
2 changed files with 3 additions and 1 deletions

View file

@ -25,7 +25,7 @@ public interface SecretQuery {
var inPlace = found.get().getSecret().inPlace();
var r = AskpassAlert.queryRaw(prompt, inPlace);
return r.isCancelled() ? Optional.empty() : found;
return r.isCancelled() ? Optional.of(r) : found;
}
@Override

View file

@ -87,7 +87,9 @@ public class SecretQueryProgress {
}
if (shouldCache) {
countDown.pause();
var cached = sup.retrieveCache(prompt, ref);
countDown.resume();
if (cached.isPresent()) {
if (cached.get().isCancelled()) {
requestCancelled = true;