mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 04:15:48 +02:00
add in-built logging support for a better dev experience
This commit is contained in:
parent
0c6cbe7746
commit
077f113618
136 changed files with 6685 additions and 7711 deletions
8
main.go
8
main.go
|
@ -41,6 +41,9 @@ func main() {
|
|||
configFlag := false
|
||||
flaggy.Bool(&configFlag, "c", "config", "Print the default config")
|
||||
|
||||
logFlag := false
|
||||
flaggy.Bool(&logFlag, "l", "logs", "Tail lazygit logs (intended to be used in a separate terminal tab to lazygit)")
|
||||
|
||||
flaggy.Parse()
|
||||
|
||||
if versionFlag {
|
||||
|
@ -53,6 +56,11 @@ func main() {
|
|||
os.Exit(0)
|
||||
}
|
||||
|
||||
if logFlag {
|
||||
app.TailLogs()
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
if repoPath != "." {
|
||||
if err := os.Chdir(repoPath); err != nil {
|
||||
log.Fatal(err.Error())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue