From 5478ab22c51f4f3ee5512449164ad513c70323eb Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Fri, 26 Aug 2022 23:07:07 +0200 Subject: [PATCH] mount: return exit code 0 after receiving a SIGINT --- cmd/restic/cmd_mount.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/restic/cmd_mount.go b/cmd/restic/cmd_mount.go index 2cc5bbdba..337920c1e 100644 --- a/cmd/restic/cmd_mount.go +++ b/cmd/restic/cmd_mount.go @@ -164,6 +164,10 @@ func runMount(opts MountOptions, gopts GlobalOptions, args []string) error { if err != nil { Warnf("unable to umount (maybe already umounted or still in use?): %v\n", err) } + // replace error code of sigint + if code == 130 { + code = 0 + } return code, nil })