summaryrefslogtreecommitdiff
path: root/internal/run.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2024-12-29 09:50:17 +0200
committerPaul Buetow <paul@buetow.org>2024-12-29 09:50:17 +0200
commitf1e2f8a241255f961d055f0b09e133ee1816b351 (patch)
tree632a0a6828a500d1156a4bc66fef85d64f5e9ed6 /internal/run.go
parent03ed103a69b6b6c2f822706e2d0f00759a4b448b (diff)
use another random entry when the previous got deleted as user input
Diffstat (limited to 'internal/run.go')
-rw-r--r--internal/run.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/run.go b/internal/run.go
index b3e4a1c..813bdf6 100644
--- a/internal/run.go
+++ b/internal/run.go
@@ -55,12 +55,13 @@ func runPlatform(ctx context.Context, args config.Args, platform platforms.Platf
return err
}
err = platform.Post(ctx, args, sizeLimit, en)
- if errors.Is(err, prompt.ErrRamdomOther) {
+ if errors.Is(err, prompt.ErrRamdomOther) || errors.Is(err, prompt.ErrDeleted) {
+
return runPlatform(ctx, args, platform, sizeLimit)
}
return err
}
func softError(err error) bool {
- return errors.Is(err, prompt.ErrAborted) || errors.Is(err, prompt.ErrDeleted)
+ return errors.Is(err, prompt.ErrAborted)
}