Skip to content

Change default of Start-PSBuild to include -PSModuleRestore - #7881

Merged
Travis Plunk (TravisEz13) merged 2 commits into
PowerShell:masterfrom
SteveL-MSFT:build-psmodulerestore
Oct 3, 2018
Merged

Travis Plunk (TravisEz13) merged 2 commits into
PowerShell:masterfrom
SteveL-MSFT:build-psmodulerestore

Conversation

@SteveL-MSFT

@SteveL-MSFT Steve Lee (SteveL-MSFT) commented Sep 27, 2018 •

Copy link
Copy Markdown
Member

PR Summary

Most of the time when building PowerShell privately to validate a fix, it is desirable to include the modules that normally ship with PowerShell Core. Without explicitly setting -PSModuleRestore you'll immediately notice that PSReadLine is not there so you do another build with that switch. This change makes -PSModuleRestore default adding a -NoPSModuleRestore for cases where you don't want the modules. The -PSModuleRestore switch is retained for compatibility reasons.

PR Checklist

Comment thread build.psm1 Outdated
[string]$ReleaseTag
)

if (!$NoPSModuleRestore)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should only be done for the default parameter set

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'll do the wrong thing for -PSModuleRestore:$false or equivalent

@TravisEz13 Travis Plunk (TravisEz13) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comments

@TravisEz13
Travis Plunk (TravisEz13) merged commit abaf186 into PowerShell:master Oct 3, 2018
@SteveL-MSFT
Steve Lee (SteveL-MSFT) deleted the build-psmodulerestore branch October 3, 2018 19:55
Aditya Patwardhan (adityapatwardhan) pushed a commit to adityapatwardhan/PowerShell that referenced this pull request Apr 9, 2019
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/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.

4 participants