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

[linux/fish-shell] Red either fails or runs depending on the way it is called #1547

Closed
xaduha opened this issue Jan 23, 2016 · 6 comments
Closed

Comments

@xaduha
Copy link
Contributor

xaduha commented Jan 23, 2016

one@voidlinux ~> pwd
/home/one
one@voidlinux ~> which red
/usr/bin/red
one@voidlinux ~> red
PROGRAM ERROR: Invalid encapsulated data.
one@voidlinux ~> /usr/bin/red
--== Red 0.5.4 ==--
Type HELP for starting information.

red>>

I'm using fish-shell, so it probably has something to do with the environment. Still, something is fishy.

one@voidlinux ~> env | sort > env1.txt
one@voidlinux ~> bash
[one@voidlinux ~]$ env | sort > env2.txt
[one@voidlinux ~]$ diff env*
16c16
< SHLVL=2

---
> SHLVL=3
22a23
> _=/usr/bin/env

Bottomline, works under bash, doesn't work under fish when called without specifying the absolute path.

Doesn't happen with red-054 or the automated build that I previously used, commit 7526673.

EDIT: Having a red binary in a current folder allows it to launch normally, red and ./red both.

@xaduha
Copy link
Contributor Author

xaduha commented Jan 23, 2016

I don't know if it's in any way helpful, but other errors I had with this

bash-4.3# red -d
*** Driver Internal Error: Access Error : Bad file path: //.red/
*** Where: throw-on-error
*** Near:  [make-dir temp-dir]

and

# red -d
** Script Error: Invalid compressed data - problem: -3
** Near: script: decapsulate
if none? script

@xaduha
Copy link
Contributor Author

xaduha commented Jan 28, 2016

Looks like it's an old issue, related to #543.

@spinningarrow
Copy link

I just got this issue on macOS with the fish shell. Should I reopen it?

@dockimbel
Copy link
Member

@spinningarrow Have you looked at the linked issue #543 ?

@spinningarrow
Copy link

spinningarrow commented Oct 15, 2017

Yes, I did. That one is closed too and I couldn't really find a proper resolution for it (other than creating an alias to red, if I understood correctly). What I'm trying to say is - is this something red can fix from its side; or failing that, provide an error message to the user when it's started incorrectly what the workaround is?

I'm also not sure why it works fine with bash but not with fish - what's the difference in the way the binary is invoked?

@gour
Copy link

gour commented Feb 9, 2018

I'm also not sure why it works fine with bash but not with fish - what's the difference in the way the binary is invoked?

I also wonder about it?

For now, I solved the issue, by having Red executable in my PATH and creating fish function ~/.config/fish/functions/red.fish with the following content:

function red
    ~/bin/red-063 $argv
end

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

4 participants