Closed auroraanna closed 2 years ago
That's weird.
Could you please post the output of ls /usr/local/starfetch/res/constellations/
?
➜ ls /usr/local/starfetch/res/constellations/
antlia.json aries.json cassiopeia.json gemini.json ophiuchus.json scorpio.json virgo.json
apus.json bootes.json corona_borealis.json leo.json orion.json taurus.json
aquarius.json cancer.json crux.json libra.json pisces.json ursa_major.json
ara.json capricorn.json cygnus.json lupus.json sagittarius.json ursa_minor.json
I'm not able to replicate this bug; I tried on both MacOS and (Arch) Linux, and it worked as expected. Therefore, if possible, I need to investigate on this issue directly on your environment.
It looks like either the path
or pathc
variables do not assume the expected value, resulting in starfetch not finding the .json files path. In order to verify this, could you please replace src/starfetch.cpp
with this version (or just add a print statement like cout << pathc << endl;
somewhere around line 60 of src/starfetch.cpp
), re-install it and run again /usr/bin/starfetch -n orion
please?
Thank you for your cooperation.
Upon further examination, considering the output of /usr/local/bin/starfetch
it looks like string::begin
on string s
is returning a very high value (18446744073709551615
), which, I suspect, means that s
is empty.
The only thing that will lead to this outcome is the file f
with path /usr/local/starfetch/res/template
not being opened properly (which still is wired, because the basic_string::replace
function is called only if f
gets opened correctly).
Knowing what the path
or pathc
variables contain during execution will probably help solving this mystery.
I'm not able to replicate this bug; I tried on both MacOS and (Arch) Linux, and it worked as expected. Therefore, if possible, I need to investigate on this issue directly on your environment.
It looks like either the
path
orpathc
variables do not assume the expected value, resulting in starfetch not finding the .json files path. In order to verify this, could you please replacesrc/starfetch.cpp
with this version (or just add a print statement likecout << pathc << endl;
somewhere around line 60 ofsrc/starfetch.cpp
), re-install it and run again/usr/bin/starfetch -n orion
please?Thank you for your cooperation.
➜ /usr/local/bin/starfetch -n orion
Error: the constellation you asked for isn't recognized.
starfetch is a command line tool that displays information about a constellation alongside its scheme.
Usage: starfetch [OPTION] [CONSTELLATION NAME]
-h Prints this help message.
-n Shows the selected constellation.
-r Shows a random constellation.
-l Prints the list of all the available constellations.
If launched with no arguments, the behaviour is the same as with '-r'.
Examples: starfetch -r
starfetch -n orion
starfetch
still the same
I guess this has to do with NixOS?
There is no /usr/local/starfetch/res/template
on my machine. There is also nothing about that folder in the Makefile.
Uh? There's no template
file under the res
folder?
That's definitely what's causing this problem.
The makefile does this: cp -rf ./res ${INSTALL_DIR}/starfetch/
, which copies the whole res
folder into /usr/local/starfetch/
, and the template
file is inside that.
Can you please check if starfetch/res/template
is present when you extract starfetch.tar.gz
? It definitely is contained in the archive.
I don't know if it has to do with the fact that the template
file has no extension, but I find it really weird?
If that's the case, I can fix this easily by giving it an extension and change the code accordingly, but it shouldn't be needed.
Umm… so originally I did git pull
to update and got this issue. I now deleted the repo folder and cloned it again - issue solved :facepalm:
I have no idea why though and I don't care either.
I installed with
sudo make install
However I getor