mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 17:59:46 +02:00
GP-0: Detecting VSCode in Windows system installer location
(Closes #8514)
This commit is contained in:
parent
b7a5878e35
commit
52b4d46cb3
1 changed files with 12 additions and 6 deletions
|
@ -66,12 +66,18 @@ public class VSCodeIntegrationOptionsPlugin extends Plugin implements Applicatio
|
||||||
*/
|
*/
|
||||||
private static File getDefaultVSCodeExecutable() {
|
private static File getDefaultVSCodeExecutable() {
|
||||||
return switch (OperatingSystem.CURRENT_OPERATING_SYSTEM) {
|
return switch (OperatingSystem.CURRENT_OPERATING_SYSTEM) {
|
||||||
case WINDOWS -> new File(System.getenv("LOCALAPPDATA"),
|
case WINDOWS:
|
||||||
|
File local = new File(System.getenv("LOCALAPPDATA"),
|
||||||
"Programs/Microsoft VS Code/bin/code.cmd");
|
"Programs/Microsoft VS Code/bin/code.cmd");
|
||||||
case MAC_OS_X -> new File(
|
File admin =
|
||||||
"/Applications/Visual Studio Code.app/Contents/MacOS/Electron");
|
new File(System.getenv("PROGRAMFILES"), "Microsoft VS Code/bin/code.cmd");
|
||||||
case LINUX -> new File("/usr/bin/code");
|
yield admin.exists() ? admin : local;
|
||||||
default -> null;
|
case MAC_OS_X:
|
||||||
|
yield new File("/Applications/Visual Studio Code.app/Contents/MacOS/Electron");
|
||||||
|
case LINUX:
|
||||||
|
yield new File("/usr/bin/code");
|
||||||
|
default:
|
||||||
|
yield null;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue