Skip to content

Commit

Permalink
direnv exec: DIR is always necessary
Browse files Browse the repository at this point in the history
```
$ 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: #492
  • Loading branch information
Profpatsch committed Apr 17, 2019
1 parent e05d32a commit 00a3544
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd_exec.go
Expand Up @@ -7,11 +7,11 @@ import (
"syscall"
)

// `direnv exec [DIR] <COMMAND> ...`
// `direnv exec DIR <COMMAND> ...`
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
Expand Down

0 comments on commit 00a3544

Please sign in to comment.