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

Passing environment variables triggers channelFailure error #55

Open
finestructure opened this issue Feb 22, 2024 · 0 comments
Open

Passing environment variables triggers channelFailure error #55

finestructure opened this issue Feb 22, 2024 · 0 comments
Assignees

Comments

@finestructure
Copy link
Contributor

My recent addition #53 is failing with a channelFailure. As discussed, I'm fairly sure this worked initially but I'm certainly now hitting the channelFailure very reliably.

The error can be avoided by sending the env request with wantReply: false but in that case the env variable isn't actually being set:

try await executeCommandStream("printing", inShell: true, environment: ["FOO": "bar"])

USER=admin
LOGNAME=admin
HOME=/Users/admin
PATH=/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin
SHELL=/bin/zsh
SSH_CLIENT=172.29.29.8 53247 22
SSH_CONNECTION=172.29.29.8 53247 192.168.64.5 22
TMPDIR=/var/folders/fs/0w3t9t1d28xc3bj0tgb8hcrw0000gn/T/
SHLVL=1
PWD=/Users/admin
OLDPWD=/Users/admin
HOMEBREW_PREFIX=/opt/homebrew
HOMEBREW_CELLAR=/opt/homebrew/Cellar
HOMEBREW_REPOSITORY=/opt/homebrew
MANPATH=/opt/homebrew/share/man::
INFOPATH=/opt/homebrew/share/info:
_=/usr/bin/printenv

Also, inShell true or false does not make a difference.

I've tried moving the env request's triggerUserOutboundEvent into createChannel but also to no effect.

I'm not sure what else to try 🤔

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