Closed 72siddharth closed 3 years ago
Can you paste the output of
echo $-lib-dir
test -e $-lib-dir/random-non-existent-package
~> echo $-lib-dir
compilation error: 5-14 in [tty]: variable $-lib-dir not found
compilation error: variable $-lib-dir not found
[tty 1], line 1: echo $-lib-dir
~> test -e $-lib-dir/random-non-existent-package
compilation error: 8-17 in [tty]: variable $-lib-dir not found
compilation error: variable $-lib-dir not found
[tty 2], line 1: test -e $-lib-dir/random-non-existent-package
Oops. Replace $-lib-dir with $epm:-lib-dir, what's the output?
~> echo $epm:-lib-dir
compilation error: 5-18 in [tty]: variable $epm:-lib-dir not found
compilation error: variable $epm:-lib-dir not found
[tty 3], line 1: echo $epm:-lib-dir
~> test -e $epm:-lib-dir/random-non-existent-package
compilation error: 8-21 in [tty]: variable $epm:-lib-dir not found
compilation error: variable $epm:-lib-dir not found
[tty 4], line 1: test -e $epm:-lib-dir/random-non-existent-package
I'm guessing this should've returned './elvish/lib'? So does this mean I need to explicitly set the value for lib-dir?
Hmm, do "use epm" first before running those commands?
Oh well, my bad.
~> echo $epm:-lib-dir
/home/sid/.elvish/lib
~> test -e $epm:-lib-dir/random-non-existent-package
0.0064
Hmm so the test
command on your system seems to be off, it's certainly not the standard UNIX test command and that's the cause of the problem. Maybe you built a test program and put it somewhere in your PATH?
epm should be changed to use https://elv.sh/ref/path.html#pathis-dir though, and that'd also avoid such problems.
sorry about the test command, completely forgot about it. This is with the standard test command
~> test -e $epm:-lib-dir/random-non-existent-package
Exception: test exited with 1
[tty 26], line 1: test -e $epm:-lib-dir/random-non-existent-package
Did you remove your own test command from PATH? If so epm:install should work as expected from now on.
Ah yes. It works now, thank you.
Installed elvish just a day ago, and came across epm. When I try to install a package, epm says its already installed but when I try to use the package it says the module doesn't exist. The directory for the modules also does not exist.
When I try to install a non-existent package it still says the module is already installed
Os - Garuda Linux Soaring Elvish Version - v0.15.0