plugin contained npm command,not work


I am writing a plugin for the idea, the idea's function is executed npm command.

When I debug plugin , It works fine, but not work when use build jar.




source code:


I have added dependencies ,and not work.




1 comment
Comment actions Permalink

The following code work.



ArrayList<String> cmds = new ArrayList<>();
GeneralCommandLine generalCommandLine = new GeneralCommandLine(cmds);
general CommandLine.setCharset(Charset.forName("UTF-8"));
generalCommandLine.addParameters("view", name, "versions", "--json");
String commandLineOutputStr = ScriptRunnerUtil.getProcessOutput(generalCommandLine);
Gson converter = new Gson();
Type type = new TypeToken<List<String>>() {
List<String> result = converter.fromJson(commandLineOutputStr, type);



Please sign in to leave a comment.