Skip to content

Commit

Permalink
♻️ panicやめる
Browse files Browse the repository at this point in the history
  • Loading branch information
ikura-hamu committed Aug 23, 2024
1 parent 5c6ebd9 commit ffc7bad
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions cmd/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ var initCmd = &cobra.Command{
}

oldState, err := term.MakeRaw(int(os.Stdin.Fd()))
if err != nil {
panic(err)
}
cobra.CheckErr(err)
defer func() {
err := term.Restore(int(os.Stdin.Fd()), oldState)
cobra.CheckErr(err)
Expand Down

0 comments on commit ffc7bad

Please sign in to comment.