Skip to content

Commit

Permalink
Disable welcome page when user is root
Browse files Browse the repository at this point in the history
Fixes #3068
  • Loading branch information
Tyriar committed Apr 7, 2016
1 parent 6456f85 commit ad7e861
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@ export abstract class AbstractGettingStarted implements IWorkbenchContribution {

protected handleWelcome(): void {
let firstStartup = !this.storageService.get(AbstractGettingStarted.hideWelcomeSettingskey);
let isRootUser = process.getuid() === 0;

if (firstStartup && this.welcomePageURL) {
// Don't open the welcome page as the root user, This is due to a bug with xdg-open which
// recommends against running itself as root.
if (firstStartup && this.welcomePageURL && !isRootUser) {
this.telemetryService.getTelemetryInfo().then(info=>{
let url = this.getUrl(info);
this.openExternal(url);
Expand Down

0 comments on commit ad7e861

Please sign in to comment.