Skip to content

Hapless in zsh, doesn't inherit shell #28

@Scream85

Description

@Scream85

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions