We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
BundledModulePath
PSModulePath
1 parent 96a8207 commit 0717bd0Copy full SHA for 0717bd0
src/PowerShellEditorServices.Hosting/EditorServicesLoader.cs
@@ -269,9 +269,13 @@ private void UpdatePSModulePath()
269
}
270
271
string psModulePath = Environment.GetEnvironmentVariable("PSModulePath").TrimEnd(Path.PathSeparator);
272
+ if ($"{psModulePath}{Path.PathSeparator}".Contains($"{_hostConfig.BundledModulePath}{Path.PathSeparator}"))
273
+ {
274
+ _logger.Log(PsesLogLevel.Diagnostic, "BundledModulePath already set, skipping");
275
+ return;
276
+ }
277
psModulePath = $"{psModulePath}{Path.PathSeparator}{_hostConfig.BundledModulePath}";
278
Environment.SetEnvironmentVariable("PSModulePath", psModulePath);
-
279
_logger.Log(PsesLogLevel.Verbose, $"Updated PSModulePath to: '{psModulePath}'");
280
281
0 commit comments