Explicitly ignore some errors

This commit is contained in:
2025-06-28 21:25:58 -04:00
parent 362eb75dc4
commit dd622c59e2
5 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -12,7 +12,7 @@ import (
// copyString copies a string to the clipboard. // copyString copies a string to the clipboard.
func copyString(continuous bool, copySubject string) error { func copyString(continuous bool, copySubject string) error {
cmd := exec.Command("pbcopy") cmd := exec.Command("pbcopy")
back.WriteToStdin(cmd, copySubject) _ = back.WriteToStdin(cmd, copySubject)
err := cmd.Run() err := cmd.Run()
if err != nil { if err != nil {
return errors.New("unable to copy to clipboard: " + err.Error()) 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. // getClipCommands returns the commands for pasting and clearing the clipboard contents.
func getClipCommands() (*exec.Cmd, *exec.Cmd) { func getClipCommands() (*exec.Cmd, *exec.Cmd) {
cmdClear := exec.Command("pbcopy") cmdClear := exec.Command("pbcopy")
back.WriteToStdin(cmdClear, "") _ = back.WriteToStdin(cmdClear, "")
return exec.Command("pbpaste"), cmdClear return exec.Command("pbpaste"), cmdClear
} }
+2 -2
View File
@@ -12,7 +12,7 @@ import (
// copyString copies a string to the clipboard. // copyString copies a string to the clipboard.
func copyString(continuous bool, copySubject string) error { func copyString(continuous bool, copySubject string) error {
cmd := exec.Command("termux-clipboard-set") cmd := exec.Command("termux-clipboard-set")
back.WriteToStdin(cmd, copySubject) _ = back.WriteToStdin(cmd, copySubject)
err := cmd.Run() err := cmd.Run()
if err != nil { if err != nil {
return errors.New("unable to copy to clipboard: " + err.Error()) 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. // getClipCommands returns the commands for pasting and clearing the clipboard contents.
func getClipCommands() (*exec.Cmd, *exec.Cmd) { func getClipCommands() (*exec.Cmd, *exec.Cmd) {
cmdClear := exec.Command("termux-clipboard-set") cmdClear := exec.Command("termux-clipboard-set")
back.WriteToStdin(cmdClear, "") _ = back.WriteToStdin(cmdClear, "")
return exec.Command("termux-clipboard-get"), cmdClear return exec.Command("termux-clipboard-get"), cmdClear
} }
+1 -1
View File
@@ -24,7 +24,7 @@ func copyString(continuous bool, copySubject string) error {
return errors.New("clipboard platform could not be determined") return errors.New("clipboard platform could not be determined")
} }
back.WriteToStdin(cmdCopy, copySubject) _ = back.WriteToStdin(cmdCopy, copySubject)
err := cmdCopy.Run() err := cmdCopy.Run()
if err != nil { if err != nil {
return errors.New("unable to copy to clipboard: " + err.Error()) return errors.New("unable to copy to clipboard: " + err.Error())
+1 -1
View File
@@ -84,7 +84,7 @@ func launchRCWDProcess() []byte {
if Daemonize { if Daemonize {
cmd := exec.Command(os.Args[0], "startrcwd") cmd := exec.Command(os.Args[0], "startrcwd")
back.WriteToStdin(cmd, string(passphrase)) _ = back.WriteToStdin(cmd, string(passphrase))
_ = cmd.Start() _ = cmd.Start()
} }
+1 -1
View File
@@ -34,7 +34,7 @@ func DeviceIDGen(oldDeviceID string) (string, string, error) {
cleanupOnFail := func() { cleanupOnFail := func() {
// remove new device ID file // remove new device ID file
os.RemoveAll(newDeviceIDPath) _ = os.RemoveAll(newDeviceIDPath)
if oldDeviceID != global.FSMisc { if oldDeviceID != global.FSMisc {
// restore old device ID file (if it existed and has already been removed due to DirInit) // restore old device ID file (if it existed and has already been removed due to DirInit)
if isAccessible, _ := back.TargetIsFile(oldDeviceIDPath, true); !isAccessible { if isAccessible, _ := back.TargetIsFile(oldDeviceIDPath, true); !isAccessible {