Skip to content

Commit 03c856c

Browse files
committed
fix: logDebugInfo user extensions path to use getExtensionData.
Previously we manually created the user extensions path from the home directory env variables and concatenated strings on to it. This is only good if the default extensions directory is used. This will fail if the user has changed the directory location with the CLI `code --extensions-dir <path>` So to fix, we're now getting the user extensions path from where ever this extension is located. The code for this is defined in `setExtensionData` method as committed in 25fab48. - Changed the construction of the users extensions path in `logDebugInfo` to use the `getExtensionData` method to get the path. - Removed the unneeded home directory variables.
1 parent 423fc58 commit 03c856c

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/configuration.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,12 +1132,9 @@ export class Configuration {
11321132
"WSL-installed User Extensions Path": path.join(vscode.env.appRoot, "../../", "extensions"),
11331133
};
11341134
} else {
1135-
// Get the user home directory from the environment variable:
1136-
// `USERPROFILE` on Windows, `HOME` on macOS/Linux.
1137-
const userHome = process.env.USERPROFILE || process.env.HOME;
11381135
extensionsPaths = {
11391136
"Built-in Extensions Path": builtInExtensionsPath,
1140-
"User Extensions Path": path.join(userHome, ".vscode", "extensions"),
1137+
"User Extensions Path": this.getExtensionData("userExtensionsPath"),
11411138
};
11421139
}
11431140

0 commit comments

Comments
 (0)