Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
jm33-m0 committed Dec 26, 2024
1 parent e7e8a85 commit 011430a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions core/lib/cc/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -721,19 +721,19 @@ func CopyToClipboard(data []byte) {
CliPrintWarning("%s not installed", exe)
return
}
stdin, err := cmd.StdinPipe()
if err != nil {
CliPrintWarning("CopyToClipboard read stdin: %v", err)
stdin, stdinErr := cmd.StdinPipe()
if stdinErr != nil {
CliPrintWarning("CopyToClipboard read stdin: %v", stdinErr)
return
}
go func() {
defer stdin.Close()
_, _ = stdin.Write(data)
}()

err = cmd.Run()
if err != nil {
CliPrintWarning("CopyToClipboard: %v", err)
stdinErr = cmd.Run()
if stdinErr != nil {
CliPrintWarning("CopyToClipboard: %v", stdinErr)
}
CliPrintInfo("Copied to clipboard")
}

0 comments on commit 011430a

Please sign in to comment.