mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 01:39:21 +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() {
|
||||
return switch (OperatingSystem.CURRENT_OPERATING_SYSTEM) {
|
||||
case WINDOWS -> new File(System.getenv("LOCALAPPDATA"),
|
||||
"Programs/Microsoft VS Code/bin/code.cmd");
|
||||
case MAC_OS_X -> new File(
|
||||
"/Applications/Visual Studio Code.app/Contents/MacOS/Electron");
|
||||
case LINUX -> new File("/usr/bin/code");
|
||||
default -> null;
|
||||
case WINDOWS:
|
||||
File local = new File(System.getenv("LOCALAPPDATA"),
|
||||
"Programs/Microsoft VS Code/bin/code.cmd");
|
||||
File admin =
|
||||
new File(System.getenv("PROGRAMFILES"), "Microsoft VS Code/bin/code.cmd");
|
||||
yield admin.exists() ? admin : local;
|
||||
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