remove sources from which command

This commit is contained in:
Shane C 2024-07-10 20:16:13 -04:00
parent 0fb6fcc14a
commit c7db79fe13
Signed by: shane
GPG key ID: E46B5FEA35B22FF9

View file

@ -22,7 +22,7 @@ func Which(cmd string, options BasicOptions) (dir string, err error) {
sourceCommand.WriteString(fmt.Sprintf("source %s && ", value)) sourceCommand.WriteString(fmt.Sprintf("source %s && ", value))
} }
command := exec.Command(sourceCommand.String(), "which", cmd) command := exec.Command("which", cmd)
if options.Cwd != "" { if options.Cwd != "" {
command.Dir = options.Cwd command.Dir = options.Cwd