flathub / com.jetbrains.IntelliJ-IDEA-Ultimate

https://flathub.org/apps/details/com.jetbrains.IntelliJ-IDEA-Ultimate
15 stars 8 forks source link

Can't use the host's "node", "yarn", and other tools #24

Closed muelli closed 4 years ago

muelli commented 5 years ago

My host's node is forwarded to the sandbox as /run/host/usr/bin/node. The sandbox' PATH does not include that, however. This is biting me when wanting to run things like "elm-format" which is a wrapped executable that starts like this:

#!/usr/bin/env node
var path = require("path");
var spawn = require("child_process").spawn;
var fs = require("fs");
var packageInfo = require(path.join(__dirname, "..", "package.json"));
var package = require(path.join(__dirname, "..", packageInfo.main));

var os = process.env.BINWRAP_PLATFORM || process.platform;
var arch = process.env.BINWRAP_ARCH || process.arch;

Here, "node" is simply not found.

When starting intellij with this env: env PATH=$PATH:/run/host/usr/bin JAVA_TOOL_OPTIONS=-Djava.io.tmpdir=${XDG_CACHE_HOME}/tmp/ TMPDIR=${XDG_CACHE_HOME}/tmp/ /app/extra/idea-IU/bin/idea.sh it works better.

So I guess I am proposing to include the host's usr/bin/ in the PATH. That might also fix #23

x80486 commented 4 years ago

@muelli, didn't you "implemented" this already?

muelli commented 4 years ago

yeah, I guess it works well enough for me. Thanks for checking in.

For posterity and all the people who are in the same boat as I was: flatpak override --user --env=EXTRA_PATH=/run/host/usr/bin com.jetbrains.IntelliJ-IDEA-Ultimate