mirror of
https://github.com/rwinkhart/libmutton.git
synced 2026-08-27 20:36:29 -04:00
Explicitly ignore some errors
This commit is contained in:
+2
-2
@@ -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
|
||||
}
|
||||
|
||||
+2
-2
@@ -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
|
||||
}
|
||||
|
||||
+1
-1
@@ -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())
|
||||
|
||||
+1
-1
@@ -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()
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user