sellout/external-program

Environment doesn't support SSH_AUTH_SOCK=/unix/path

Closed this issue · 7 comments

There is presently no way to pass environment variables such as SSH_AUTH_SOCK=/tmp/ssh-BLAH/. They are upcased when symbols, if passed as |/tmp/ssh-BLAH/| the pipes remain, etc. Perhaps I'm missing something simple...

Is there some reason you can't use a string?

(("SSH_AUTH_SOCK" . "/unix/path"))

I'm not sure whether to blame rsync or ssh-agent but it seems the environment var needs to be a literal path and not a string. If I pass the above and run "env" the process returns 'SSH_AUTH_SOCK="/unix/path"'.

That seems correct to me … can you tell me how that differs from what you expect?

Oh, I see – you end up with the quotes in the value. Ok, I'll take a look.

Also, what CL impl/version are you using?

Sorry for the wait. I was on a plane...then another one. I'm using SBCL 1.0.46. I can also test with CCL 1.6 and ECL 11.1 if you want. The backup script itself can be seen here: https://github.com/redline6561/dotfiles/blob/master/scripts/backup.lisp

Maybe if the cdr is a pathname you can use ~a instead of ~s in REFORMAT-ENVIRONMENT? Then we're trying to "be clever" for the user though. Another approach would be to accept conses or strings and use a ETYPECASE or something. That would probably be my vote. I'll write a patch in a bit if you'd like...

Sorry for the long delay – this should be fixed now.