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

hook select crashes #7

Closed
Hanspe-3019 opened this issue Feb 7, 2022 · 5 comments
Closed

hook select crashes #7

Hanspe-3019 opened this issue Feb 7, 2022 · 5 comments

Comments

@Hanspe-3019
Copy link

Running on Intel Core i5:

% hook select https://www.nachdenkseiten.de       
sh: line 2: /Library/Ruby/Gems/2.6.0/gems/hookapp-2.0.8/lib/hook/../helpers/fuzzyfilefinder: Bad CPU type in executable
hookapp-2.0.8/lib/helpers % file fuzzyfilefinder 
fuzzyfilefinder: Mach-O 64-bit executable arm64

Can to provide a universal file?

@ttscoff
Copy link
Owner

ttscoff commented Mar 8, 2022

Ah, I ran into this issue with my doing project as well. The solution I came up with was to build the fzf binary at runtime, so I'll need to work that functionality into the hook CLI. In the meantime, if you run brew install fzf and copy the fzf binary to /Library/Ruby/Gems/2.6.0/gems/hookapp-2.0.8/lib/helpers/fuzzyfilefinder (renaming to fuzzyfilefinder) it should allow the command to run for you.

@ttscoff
Copy link
Owner

ttscoff commented May 26, 2022

Finally got around to updating this with a more robust fzf handler. Please install 2.0.9 (gem install hookapp should get the latest version) and run hook select FILENAME to see if it works for you. If all goes well, it will either find a local version (e.g. /usr/local/bin/fzf) or install a platform-appropriate version inside its own helper directory.

@Hanspe-3019
Copy link
Author

Did install 2.0.9. Got error when executing hook:

/usr/local/bin/hook:23:in `load': cannot load such file -- /Library/Ruby/Gems/2.6.0/gems/hookapp-2.0.9/bin/hook (LoadError)
	from /usr/local/bin/hook:23:in `<main>'

Cause: File mode in hookapp-2.0.9/** not set for group and other.
Run sudo chmod +r ...

Now hook-cli seems to work. Because fzf is already in my path, I did not test installation helper for fzf. I inspected the files in hookapp-2.0.9: The directory helpers is missing, so the install should not succeed anyway.

@ttscoff
Copy link
Owner

ttscoff commented May 28, 2022 via email

@Hanspe-3019
Copy link
Author

2.0.10 fixes the permissions issues. hook select FILENAME works using my local fzf (mac ports).

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