Skip to content
This repository has been archived by the owner on Jul 18, 2022. It is now read-only.

Commit

Permalink
Fixing insider build detection
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronpowell committed Jul 25, 2019
1 parent fe23cdb commit 405d5ea
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/settingsHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ export default class SettingsHelper {
public ExtensionFolder: string;

public constructor(private context: vscode.ExtensionContext) {
this.isInsiders = /insiders/.test(this.context.asAbsolutePath(""));
this.isInsiders = /insiders/.test(process.execPath.toLowerCase());
this.isPortable = process.env.VSCODE_PORTABLE ? true : false;
this.isOss = /\boss\b/.test(this.context.asAbsolutePath(""));
this.isOss = /\boss\b/.test(process.execPath.toLowerCase());

const isXdg =
!this.isInsiders &&
Expand All @@ -34,10 +34,10 @@ export default class SettingsHelper {
this.homeDir = isXdg
? process.env.XDG_DATA_HOME || ""
: process.env[process.platform === "win32" ? "USERPROFILE" : "HOME"] ||
"";
"";
const configSuffix = `${isXdg ? "" : "."}vscode${
this.isInsiders ? "-insiders" : this.isOss ? "-oss" : ""
}`;
}`;

if (!this.isPortable) {
if (process.platform === "darwin") {
Expand Down

0 comments on commit 405d5ea

Please # to comment.