mirror of
https://github.com/schollz/croc.git
synced 2025-10-11 13:21:00 +02:00
Merge pull request #325 from nikoksr/fix/missing-code-too-short-error
fix(cli): make 'code too short' error symmetric on both sender and receiver side
This commit is contained in:
commit
ef43873c3b
2 changed files with 8 additions and 8 deletions
4
main.go
4
main.go
|
@ -5,7 +5,7 @@ package main
|
|||
//go:generate git tag -af v$VERSION -m "v$VERSION"
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
|
||||
"github.com/schollz/croc/v8/src/cli"
|
||||
)
|
||||
|
@ -28,6 +28,6 @@ func main() {
|
|||
// }
|
||||
// }()
|
||||
if err := cli.Run(); err != nil {
|
||||
fmt.Println(err)
|
||||
log.Fatalln(err)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -225,9 +225,9 @@ func send(c *cli.Context) (err error) {
|
|||
return
|
||||
}
|
||||
defer func() {
|
||||
err = os.Remove(fnames[0])
|
||||
if err != nil {
|
||||
log.Error(err)
|
||||
e := os.Remove(fnames[0])
|
||||
if e != nil {
|
||||
log.Error(e)
|
||||
}
|
||||
}()
|
||||
} else if c.String("text") != "" {
|
||||
|
@ -236,9 +236,9 @@ func send(c *cli.Context) (err error) {
|
|||
return
|
||||
}
|
||||
defer func() {
|
||||
err = os.Remove(fnames[0])
|
||||
if err != nil {
|
||||
log.Error(err)
|
||||
e := os.Remove(fnames[0])
|
||||
if e != nil {
|
||||
log.Error(e)
|
||||
}
|
||||
}()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue