mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-04 23:37:41 +02:00
Ignore return values of fmt.Scanln
This commit is contained in:
parent
63aa32c521
commit
8dea2dab88
@ -970,7 +970,7 @@ func (gui *Gui) runSubprocess(cmdObj oscommands.ICmdObj) error { //nolint:unpara
|
|||||||
|
|
||||||
// scan to buffer to prevent run unintentional operations when TUI resumes.
|
// scan to buffer to prevent run unintentional operations when TUI resumes.
|
||||||
var buffer string
|
var buffer string
|
||||||
fmt.Scanln(&buffer) // wait for enter press
|
_, _ = fmt.Scanln(&buffer) // wait for enter press
|
||||||
}
|
}
|
||||||
|
|
||||||
return err
|
return err
|
||||||
|
@ -292,7 +292,7 @@ func suspendAndRunTest(test *components.IntegrationTest, sandbox bool, waitForDe
|
|||||||
runTuiTest(test, sandbox, waitForDebugger, raceDetector, inputDelay)
|
runTuiTest(test, sandbox, waitForDebugger, raceDetector, inputDelay)
|
||||||
|
|
||||||
fmt.Fprintf(os.Stdout, "\n%s", style.FgGreen.Sprint("press enter to return"))
|
fmt.Fprintf(os.Stdout, "\n%s", style.FgGreen.Sprint("press enter to return"))
|
||||||
fmt.Scanln() // wait for enter press
|
_, _ = fmt.Scanln() // wait for enter press
|
||||||
|
|
||||||
if err := gocui.Screen.Resume(); err != nil {
|
if err := gocui.Screen.Resume(); err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user