mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Merge pull request #22424 from atom/fix-reopen-projects-safe-dev-mode
Pass safeMode and devMode on reopening a project
This commit is contained in:
@@ -1036,7 +1036,12 @@ class AtomEnvironment {
|
||||
commands: this.commands,
|
||||
history: this.history,
|
||||
config: this.config,
|
||||
open: paths => this.open({ pathsToOpen: paths })
|
||||
open: paths =>
|
||||
this.open({
|
||||
pathsToOpen: paths,
|
||||
safeMode: this.inSafeMode(),
|
||||
devMode: this.inDevMode()
|
||||
})
|
||||
});
|
||||
this.reopenProjectMenuManager.update();
|
||||
});
|
||||
|
||||
@@ -619,6 +619,12 @@ module.exports = class AtomApplication extends EventEmitter {
|
||||
|
||||
if (process.platform === 'darwin') {
|
||||
this.on('application:reopen-project', ({ paths }) => {
|
||||
const focusedWindow = this.focusedWindow();
|
||||
if (focusedWindow) {
|
||||
const { safeMode, devMode } = focusedWindow;
|
||||
this.openPaths({ pathsToOpen: paths, safeMode, devMode });
|
||||
return;
|
||||
}
|
||||
this.openPaths({ pathsToOpen: paths });
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user