-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
SnipInfo Command Error and Unable to receive user input. #222
Comments
Hey, please fill correctly your bug report. SnipInfo works on my end (I would be tempted to say 'obviously'), so unless you provide me with enough info, I won't be able to fix your issue |
~/.cache/sniprun/infofile.txt, I don't have this document |
But my main problem is that I still can't pop up to receive user input, causing my cin function to be a random value. |
local lines = lines_from(sniprun_cache_dir.."/infofile.txt") This code caused me to get a nil. |
That's a limitation of sniprun. It won't be fixed in the near future, see #146
It's supposed to be generated, and I hardly see where it can fail. Could you copy here the content of ~/.cache/sniprun/sniprun.log after trying to run SnipInfo ? |
I can't find the sniprun folder in the .cache folder. |
Wut. Does sniprun even work ? (Run it on a very simple line such as "print(1)" in a python file) Or do you have an $XDG_CACHE_DIR environment variable that's set to somewhere strange ? |
I didn't set this $XDG_CACHE_DIR environment variable, and my sniprun can output printf("hello world"); |
okay, so this just got from strange to stranger. I'll explain. Sniprun (the binary part) generates stuff (including the infofile.txt, the log and some files it needs to run correctly) in a directory that's supposed to be standard
And the Lua plugin part, that doesn't have the info, looks into $XDG_CACHE_HOME (sorry for earlier, it's ...HOME, not ...DIR), or defaults to $HOME/.cache So, my conclusion is that these two don't point to the same location. You didn't say what OS you were running on, but possibly something isn't quite XDG-compliant. |
I'm using macOS. |
So what should I do? Specify the path XDG_CACHE_HOME in the zshrc file, or should I make other settings? |
I think you should specify the XDG_CACHE_DIR in your shell's rc configuration file, but preferably make it point to the value of the default cache directory on macos (google says it's ~/Library/Caches, and if you find a sniprun subdir there it's confirmed). I'll fix the search path for the infofile, but the above should fix the issue in the meantime |
|
The last release also search for the temporary SnipInfo file in ~/Library/cache now, so it should be automatically fixed |
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment:
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: