Skip to content

Fix -psmodulerestore path when start-psbuild is used in VSCode default build task - #8075

Merged
Travis Plunk (TravisEz13) merged 1 commit into
PowerShell:masterfrom
SteveL-MSFT:build-modulerestore
Oct 20, 2018
Merged

Fix -psmodulerestore path when start-psbuild is used in VSCode default build task#8075
Travis Plunk (TravisEz13) merged 1 commit into
PowerShell:masterfrom
SteveL-MSFT:build-modulerestore

Conversation

@SteveL-MSFT

@SteveL-MSFT Steve Lee (SteveL-MSFT) commented Oct 18, 2018

Copy link
Copy Markdown
Member

PR Summary

The logic in set the publish path for -psmodulerestore assumes a path that contains the pwsh executable so it uses the parent of -OutputPath. However, the VSCode default build task specifies a debug folder in the root of the repo. So the logic uses the parent and thus creates a Modules folder in the root of the repo. The fix is to check if the -OutputPath ends with pwsh and if so use the previous logic of using the parent folder, otherwise, just use the -OutputPath.

PR Checklist

@TravisEz13
Travis Plunk (TravisEz13) merged commit ef504e5 into PowerShell:master Oct 20, 2018
@SteveL-MSFT
Steve Lee (SteveL-MSFT) deleted the build-modulerestore branch March 10, 2020 21:01
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj/PowerShell that referenced this pull request Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants