Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hapless in zsh, doesn't inherit shell #28

Open
Scream85 opened this issue Jan 5, 2024 · 1 comment
Open

Hapless in zsh, doesn't inherit shell #28

Scream85 opened this issue Jan 5, 2024 · 1 comment

Comments

@Scream85
Copy link

Scream85 commented Jan 5, 2024

I have a zsh function that I store in .zshrc, my shell is zsh.
When I try to run my function, I get the following error:
/bin/sh: somezshfunction: command not found

$ hap clean
🧲 Deleted 4 finished haps

$ hap status
🧲 No haps are currently running

$ hap run 'somezshfunction'
🧲 Launching hap ⚡️1 (hap-tp9g3w)

$ hap status
┏━━━━┯━━━━━━━━━━━━┯━━━━━━━┯━━━━━━━━━━┯━━━━━┯━━━━━━━━━━┓
┃ #  │ Name       │ PID   │ Status   │  RC │  Runtime ┃
┠────┼────────────┼───────┼──────────┼─────┼──────────┨
┃ 1  │ hap-tp9g3w │ 66805 │ • failed │ 127 │ a moment ┃
┗━━━━┷━━━━━━━━━━━━┷━━━━━━━┷━━━━━━━━━━┷━━━━━┷━━━━━━━━━━┛

$ hap logs --stderr hap-tp9g3w
/bin/sh: somezshfunction: command not found

$ set | grep -i shell
SHELL=/bin/zsh

I tried to include it in the command to use zsh, but same error:

 $ hap logs --stderr hap-213nam
/bin/sh: zsh -c 'somezshfunction': command not found

Is there a way to make this work or set hapless to use zsh?

@bmwant
Copy link
Owner

bmwant commented Jan 9, 2024

@Scream85 fix is in place, will release a new version of the package soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants