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

search fails on macOS 10.15 #430

Closed
adamnbowen opened this issue Oct 9, 2020 · 11 comments
Closed

search fails on macOS 10.15 #430

adamnbowen opened this issue Oct 9, 2020 · 11 comments
Labels
non-nix Problems in a non-nix based install regression

Comments

@adamnbowen
Copy link
Contributor

I'm getting a strange error when I try to use the search:

$ neuron search
envsubst: invalid option -- 'n'
Try 'envsubst --help' for more information.

I'm not familiar enough with how the project is built, but I just upgraded to 1.0.1.0 a few minutes ago (search didn't work yesterday for me, but I imagine that's because of the static linking issue resolved in 1.0.1.0).

Let me know if you need more help getting a reproduction of this issue: I only have a handful of notes in my ~/zettelkasten directory, so it's probably not a problem with scale.

@srid
Copy link
Owner

srid commented Oct 9, 2020

Crap. This is what you get for stepping outside of Nix (and the guarantees of staticWhich). Reverting in #431

Proper fix coming later.

@srid srid pinned this issue Oct 9, 2020
@srid
Copy link
Owner

srid commented Oct 9, 2020

Revert fixed it. Proper fix in #432

@srid srid closed this as completed Oct 9, 2020
@srid srid unpinned this issue Oct 9, 2020
@fiatjaf
Copy link
Contributor

fiatjaf commented Oct 19, 2020

I'm experiencing this on binary release 1.0.1.0. Was it supposed to be fixed there?

@adamnbowen
Copy link
Contributor Author

I'm experiencing this on binary release 1.0.1.0. Was it supposed to be fixed there?

That's the release this issue is talking about, so it was not fixed yet in that release.

@srid
Copy link
Owner

srid commented Oct 19, 2020

@fiatjaf That's a different issue. You can't bake runtime dependencies like fzf and envsubst (nix-env -i envsubst should resolve your issue) into a static binary. If you are using the static binary, it is up to you as the user to install the runtime dependencies manually (we should document this).

Or just use Nix, so you don't have to deal with this annoyance.

srid added a commit that referenced this issue Oct 20, 2020
srid added a commit that referenced this issue Oct 20, 2020
srid added a commit that referenced this issue Oct 20, 2020
srid added a commit that referenced this issue Oct 20, 2020
@srid
Copy link
Owner

srid commented Oct 20, 2020

Clarified the static binary limitations here: https://neuron.zettel.page/install-static.html

@jmiskovic
Copy link

I'm getting same error message on Fedora 32.

Pulling in whole package manager for single tool is not an option for me. Resolving dependencies is ok if there is a clear list of dependencies, preferably with minimal versions.

Going from project.nix those are: fzf, ripgrep, gawk, bat, findutils and envsubst. I have all of those installed and I'm still getting the error. Looks like envsubst is referring to this repo which seems completely unrelated to my OS-installed tool?

@fiatjaf
Copy link
Contributor

fiatjaf commented Oct 29, 2020

I have fzf, bat and envsubst (is there any other dependencies included in the "etc"?), but still my neuron search fails:

envsubst: invalid option -- 'n'
Try 'envsubst --help' for more information.

Maybe I have a different envsubst version than needed? The one I have is envsubst (GNU gettext-runtime) 0.20.2.

(Sorry for poisoning your life with non-nix issues.)

@jmiskovic
Copy link

My workaround was downloading release of envsubst, putting it into ~/tools and adding this to .bashrc to make sure it is used instead of gettext one:

alias neuron='PATH=~/tools:$PATH neuron'

@fiatjaf
Copy link
Contributor

fiatjaf commented Oct 29, 2020

Ok, I did download a new envsubst release and now it opens the fzf search screen, but it is not populated. There are zero zettels in there! And I'm in my zettelkasten directory. It is also empty if I specify -d.

@srid
Copy link
Owner

srid commented Oct 29, 2020

One way to workaround this problem is to get rid of envsubst entirely, and resolve the environment variable in Haskell, right about here:

bool "echo" "$EDITOR" searchEdit

@srid srid added the non-nix Problems in a non-nix based install label Oct 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
non-nix Problems in a non-nix based install regression
Projects
None yet
Development

No branches or pull requests

4 participants