Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from Oct 3, 2018

Conversation

SteveL-MSFT
Copy link
Member

@SteveL-MSFT SteveL-MSFT commented Sep 27, 2018

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

build.psm1 Outdated
@@ -448,6 +451,11 @@ function Start-PSBuild {
[string]$ReleaseTag
)

if (!$NoPSModuleRestore)
Copy link
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
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

Copy link
Member

@TravisEz13 TravisEz13 left a comment

Choose a reason for hiding this comment

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

see comments

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

None yet

4 participants