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:
Sadick
2021-05-15 12:19:02 +03:00
committed by GitHub
2 changed files with 12 additions and 1 deletions

View File

@@ -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();
});

View File

@@ -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 });
});