Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

Commit

Permalink
Merge pull request #71 from Particular/ps-path
Browse files Browse the repository at this point in the history
Remove the last slash in Powershell installation path
  • Loading branch information
HEskandari authored Dec 18, 2020
2 parents 5f8b808 + 87bf45b commit 3f33670
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/NServiceBus.PowerShell.CustomActions/CustomAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ public static ActionResult RemoveFromPSModuleEnvironmentVar(Session session)
{
//Advanced Installer doesn't notify of environment changes on system environment variables
var appDir = session["PowerShellModules_Dir"];
if (appDir.EndsWith(@"\"))
{
appDir = appDir.Remove(appDir.Length - 1);
}

var environmentVariable = Environment.GetEnvironmentVariable(PSModulePath, EnvironmentVariableTarget.Machine);
if (environmentVariable != null)
Expand Down

0 comments on commit 3f33670

Please sign in to comment.