From 00a35443b23d84ec722f501e365c282a2056a884 Mon Sep 17 00:00:00 2001 From: Philip Patsch Date: Wed, 17 Apr 2019 18:39:33 +0200 Subject: [PATCH] direnv exec: DIR is always necessary ``` $ direnv exec bash -c "true" direnv: error stat bash: no such file or directory $ direnv exec bash direnv: error stat bash: no such file or directory ``` Meaning leaving out the DIR argument was never really an option. Closes: https://github.com/direnv/direnv/issues/492 --- cmd_exec.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd_exec.go b/cmd_exec.go index 61c620bfa..6193a2409 100644 --- a/cmd_exec.go +++ b/cmd_exec.go @@ -7,11 +7,11 @@ import ( "syscall" ) -// `direnv exec [DIR] ...` +// `direnv exec DIR ...` var CmdExec = &Cmd{ Name: "exec", Desc: "Executes a command after loading the first .envrc found in DIR", - Args: []string{"[DIR]", "COMMAND", "[...ARGS]"}, + Args: []string{"DIR", "COMMAND", "[...ARGS]"}, Action: actionWithConfig(func(env Env, args []string, config *Config) (err error) { var ( backupDiff *EnvDiff