mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Cleanup (formatting)
This commit is contained in:
@@ -17,10 +17,8 @@ while os.getppid() == pid:
|
||||
time.sleep(0.5)
|
||||
|
||||
if len(sys.argv) > 3:
|
||||
os.spawnv(os.P_WAIT, sys.argv[3], sys.argv[3:])
|
||||
to_launch = sys.argv[3:]
|
||||
os.spawnv(os.P_WAIT, to_launch[0], to_launch)
|
||||
|
||||
to_launch = sys.argv[2]
|
||||
if sys.platform == 'darwin':
|
||||
os.execv('/usr/bin/open', ['/usr/bin/open', to_launch])
|
||||
else:
|
||||
os.execv(to_launch, [to_launch])
|
||||
to_launch = ['/usr/bin/open', sys.argv[2]] if sys.platform == 'darwin' else [sys.argv[2]]
|
||||
os.execv(to_launch[0], to_launch)
|
||||
|
||||
@@ -41,11 +41,15 @@ public class Restarter {
|
||||
|
||||
public static boolean isSupported() {
|
||||
if (SystemInfo.isWindows) {
|
||||
return JnaLoader.isLoaded() && new File(PathManager.getBinPath(), "restarter.exe").exists();
|
||||
return JnaLoader.isLoaded() &&
|
||||
new File(PathManager.getBinPath(), "restarter.exe").exists();
|
||||
}
|
||||
|
||||
if (SystemInfo.isMac) {
|
||||
return PathManager.getHomePath().contains(".app") && new File(PathManager.getBinPath(), "restarter").canExecute();
|
||||
return PathManager.getHomePath().contains(".app") &&
|
||||
new File(PathManager.getBinPath(), "restarter").canExecute();
|
||||
}
|
||||
|
||||
if (SystemInfo.isUnix) {
|
||||
return JnaLoader.isLoaded() &&
|
||||
CreateDesktopEntryAction.getLauncherScript() != null &&
|
||||
|
||||
Reference in New Issue
Block a user