Skip to content

Commit

Permalink
optimize: advance sudo if use gg sudo
Browse files Browse the repository at this point in the history
  • Loading branch information
mzz2017 committed Sep 16, 2022
1 parent dc27990 commit 9ed95e0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,10 @@ or
$ gg git clone https://github.com/mzz2017/gg.git`)
return
}
// auto su
AutoSu()
// auto su if use 'gg sudo' or 'gg su'
if os.Args[1] == "sudo" || os.Args[1] == "su" {
AutoSu()
}
// initiate config from args and config file
log := GetLogger(verbose)
log.Traceln("Version:", Version)
Expand Down

0 comments on commit 9ed95e0

Please sign in to comment.