提交 ad7e861d 编写于 作者: D Daniel Imms

Disable welcome page when user is root

Fixes #3068
上级 6456f857
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册