Skip to content

Commit 543447c

Browse files
authored
fix: crda not found (#87)
Fixes #86 Signed-off-by: Jeff MAURY <[email protected]> Signed-off-by: Jeff MAURY <[email protected]>
1 parent aedbaea commit 543447c

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

src/main/java/org/jboss/tools/intellij/stackanalysis/PreloadCli.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import com.intellij.openapi.application.PreloadingActivity;
1515
import com.intellij.openapi.components.ServiceManager;
1616
import com.intellij.openapi.diagnostic.Logger;
17+
import com.intellij.openapi.progress.ProcessCanceledException;
1718
import com.intellij.openapi.progress.ProgressIndicator;
1819
import org.jboss.tools.intellij.analytics.GitHubReleaseDownloader;
1920
import org.jboss.tools.intellij.analytics.ICookie;
@@ -66,6 +67,7 @@ public void preload(@NotNull ProgressIndicator indicator) {
6667
new SaProcessExecutor().authenticateUser();
6768
} catch(IOException | InterruptedException e) {
6869
logger.warn(e);
70+
throw new ProcessCanceledException(e);
6971
}
7072
}
7173
}

src/main/java/org/jboss/tools/intellij/stackanalysis/SaAction.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import com.intellij.openapi.actionSystem.CommonDataKeys;
1919
import com.intellij.openapi.diagnostic.Logger;
2020
import com.intellij.openapi.fileEditor.FileEditorManager;
21+
import com.intellij.openapi.ui.Messages;
2122
import com.intellij.openapi.vfs.VirtualFile;
2223
import com.intellij.psi.PsiFile;
2324

@@ -57,6 +58,9 @@ public void actionPerformed(@NotNull AnActionEvent event) {
5758
saUtils.openCustomEditor(FileEditorManager.getInstance(event.getProject()), manifestDetails);
5859
} catch (Exception e) {
5960
logger.warn(e);
61+
Messages.showErrorDialog(event.getProject(),
62+
"Can't run report generation " + e.getLocalizedMessage(),
63+
"Error");
6064
}
6165
}
6266

src/main/java/org/jboss/tools/intellij/stackanalysis/SaProcessExecutor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class SaProcessExecutor {
2929
private static final Logger logger = Logger.getInstance(SaProcessExecutor.class);
3030
private static final String CLI_CONFIG_FILE_PATH = Paths.get(System.getProperty("user.home"),
3131
".crda", "config.yaml").toString();
32-
private static final String CLI_COMMAND = SystemInfo.isLinux ? "./crda" : "crda";
32+
private static final String CLI_COMMAND = Platform.pluginDirectory + File.separator + "crda";
3333

3434

3535
/**

0 commit comments

Comments
 (0)