mirror of
https://github.com/Luzifer/envrun.git
synced 2024-12-20 18:31:17 +00:00
Add check for missing command arguments
closes #1 Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
19371bae55
commit
d88df7e1bf
1 changed files with 4 additions and 0 deletions
4
main.go
4
main.go
|
@ -100,6 +100,10 @@ func main() {
|
|||
childenv[k] = v
|
||||
}
|
||||
|
||||
if len(rconfig.Args()) < 2 {
|
||||
log.Fatal("No command specified")
|
||||
}
|
||||
|
||||
c := exec.Command(rconfig.Args()[1], rconfig.Args()[2:]...)
|
||||
c.Env = envMapToList(childenv)
|
||||
c.Stdout = os.Stdout
|
||||
|
|
Loading…
Reference in a new issue