1
0
Fork 0
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:
Knut Ahlers 2019-08-04 12:23:52 +02:00
parent 19371bae55
commit d88df7e1bf
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -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