From dd622c59e2645a5a15d0a1a72cdd16ffa4915d6c Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Sat, 28 Jun 2025 21:25:58 -0400 Subject: [PATCH] Explicitly ignore some errors --- core/copyDARWIN.go | 4 ++-- core/copyTERMUX.go | 4 ++-- core/copyUNIX.go | 2 +- crypt/rcw.go | 2 +- synccycles/init.go | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/core/copyDARWIN.go b/core/copyDARWIN.go index f8b6236..61c343d 100644 --- a/core/copyDARWIN.go +++ b/core/copyDARWIN.go @@ -12,7 +12,7 @@ import ( // copyString copies a string to the clipboard. func copyString(continuous bool, copySubject string) error { cmd := exec.Command("pbcopy") - back.WriteToStdin(cmd, copySubject) + _ = back.WriteToStdin(cmd, copySubject) err := cmd.Run() if err != nil { return errors.New("unable to copy to clipboard: " + err.Error()) @@ -26,6 +26,6 @@ func copyString(continuous bool, copySubject string) error { // getClipCommands returns the commands for pasting and clearing the clipboard contents. func getClipCommands() (*exec.Cmd, *exec.Cmd) { cmdClear := exec.Command("pbcopy") - back.WriteToStdin(cmdClear, "") + _ = back.WriteToStdin(cmdClear, "") return exec.Command("pbpaste"), cmdClear } diff --git a/core/copyTERMUX.go b/core/copyTERMUX.go index ddd898a..0625701 100644 --- a/core/copyTERMUX.go +++ b/core/copyTERMUX.go @@ -12,7 +12,7 @@ import ( // copyString copies a string to the clipboard. func copyString(continuous bool, copySubject string) error { cmd := exec.Command("termux-clipboard-set") - back.WriteToStdin(cmd, copySubject) + _ = back.WriteToStdin(cmd, copySubject) err := cmd.Run() if err != nil { return errors.New("unable to copy to clipboard: " + err.Error()) @@ -26,6 +26,6 @@ func copyString(continuous bool, copySubject string) error { // getClipCommands returns the commands for pasting and clearing the clipboard contents. func getClipCommands() (*exec.Cmd, *exec.Cmd) { cmdClear := exec.Command("termux-clipboard-set") - back.WriteToStdin(cmdClear, "") + _ = back.WriteToStdin(cmdClear, "") return exec.Command("termux-clipboard-get"), cmdClear } diff --git a/core/copyUNIX.go b/core/copyUNIX.go index 4014836..a3b4ab0 100644 --- a/core/copyUNIX.go +++ b/core/copyUNIX.go @@ -24,7 +24,7 @@ func copyString(continuous bool, copySubject string) error { return errors.New("clipboard platform could not be determined") } - back.WriteToStdin(cmdCopy, copySubject) + _ = back.WriteToStdin(cmdCopy, copySubject) err := cmdCopy.Run() if err != nil { return errors.New("unable to copy to clipboard: " + err.Error()) diff --git a/crypt/rcw.go b/crypt/rcw.go index f9cddf6..cb557d3 100644 --- a/crypt/rcw.go +++ b/crypt/rcw.go @@ -84,7 +84,7 @@ func launchRCWDProcess() []byte { if Daemonize { cmd := exec.Command(os.Args[0], "startrcwd") - back.WriteToStdin(cmd, string(passphrase)) + _ = back.WriteToStdin(cmd, string(passphrase)) _ = cmd.Start() } diff --git a/synccycles/init.go b/synccycles/init.go index 370e41a..b01e1c9 100644 --- a/synccycles/init.go +++ b/synccycles/init.go @@ -34,7 +34,7 @@ func DeviceIDGen(oldDeviceID string) (string, string, error) { cleanupOnFail := func() { // remove new device ID file - os.RemoveAll(newDeviceIDPath) + _ = os.RemoveAll(newDeviceIDPath) if oldDeviceID != global.FSMisc { // restore old device ID file (if it existed and has already been removed due to DirInit) if isAccessible, _ := back.TargetIsFile(oldDeviceIDPath, true); !isAccessible {