Making it use USER env if no user is sspecified.
This commit is contained in:
parent
3146957dee
commit
1b9ab80b93
@ -3,6 +3,7 @@ package main
|
|||||||
import (
|
import (
|
||||||
"flag"
|
"flag"
|
||||||
"log"
|
"log"
|
||||||
|
"os"
|
||||||
|
|
||||||
"git.linuxrocker.com/mattburchett/go_tab-magic/pkg/config"
|
"git.linuxrocker.com/mattburchett/go_tab-magic/pkg/config"
|
||||||
"git.linuxrocker.com/mattburchett/go_tab-magic/pkg/resolver"
|
"git.linuxrocker.com/mattburchett/go_tab-magic/pkg/resolver"
|
||||||
@ -25,7 +26,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if user == "" {
|
if user == "" {
|
||||||
log.Fatal("Username is not specified.")
|
user = os.Getenv("USER")
|
||||||
}
|
}
|
||||||
|
|
||||||
cfg, err := config.GetConfig(c, debug)
|
cfg, err := config.GetConfig(c, debug)
|
||||||
|
Loading…
Reference in New Issue
Block a user