Skip to content

Commit d46e2ca

Browse files
gnodar01joelspadin
authored andcommitted
Use full path to shell
- Resolves #26 - execl requires the full path as the first argument, not just the shell name returned by shellingham
1 parent 85c50d1 commit d46e2ca

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

zmk/commands/cd.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import subprocess
77
import sys
88
from pathlib import Path
9+
import shutil
910

1011
import shellingham
1112
import typer
@@ -39,6 +40,7 @@ def cd(ctx: typer.Context) -> None:
3940

4041
try:
4142
_, shell = shellingham.detect_shell()
43+
shell = shutil.which(shell) or _default_shell()
4244
except shellingham.ShellDetectionFailure:
4345
shell = _default_shell()
4446

0 commit comments

Comments
 (0)