Open b-studios opened 4 years ago
I could also reproduce the bug on a fresh 18.04 VM:
$ effekt
/usr/bin/env: 'java -jar': No such file or directory
As a workaround, one can of course run java -jar /usr/local/bin/effekt
, but this is not satisfactory. However, getting vscode on Ubuntu to work is a bit more tricky since adjusting the path in the settings will not work for reasons similar to the ones described above.
A more reliable workaround is the following:
Create a script effekt.sh
with the following contents:
#!/bin/bash
java -jar /usr/bin/local/effekt $@
and make it executable. Put this script in your PATH
and use effekt.sh
instead of effekt
. This also works for VSCode:
effekt.sh
(or the absolute path to the script) thereThis solution also interacts well with updating the effekt package. Since the script only forwards to effekt, updating it under the hood just works.
As a workaround I added the script to the distribution (87a4b0) and link it as effekt.sh
. So linux users for now need to call effekt.sh
instead of effekt
. Also VSCode can now be configured to point to effekt.sh
if effekt
does not work.
This needs to be documented on the website.
So why not just pass -S
to env
to make it recognize the multiple arguments?
So why not just pass
-S
toenv
to make it recognize the multiple arguments?
This -S
flag breaks on windows :(
On Ubuntu 16.04 it has been reported that Effekt cannot be exeucted since
java -jar
is treated as one command instead of a command and an argument.The Effekt "binary" is created by prefixing:
to the jar file itself. Installing it with npm makes the binary available (almost) platform independently. In particular on Windows, npm analyses the shebang and automatically generates scripts that correctly start Effekt by invoking
java -jar
.We could change the shebang to
which seems to work on MacOS X, Windows 10 and Ubuntu 16.04 -- however, now we cannot start Effekt as a subprocess from node. This is necessary to start the language server in the VSCode extension.