Repository navigation
Replace OneGet assemblies with these generated by OneGet.org - #2711
Conversation
sergei (vors)
left a comment
There was a problem hiding this comment.
Overall, looks good to me
There was a problem hiding this comment.
You don't need () around log calls
There was a problem hiding this comment.
I would flip the default behavior and make it -PSModuleRestore.
Very tiny Start-PSBuild should be the bare minimum of things sufficient to run PowerShell.
It also should be incremental-friendly.
There was a problem hiding this comment.
changed to PSModuleRestore
There was a problem hiding this comment.
This logic is not correct
On incremental builds, it would Silently not change the folder- When user provide a custom
binDir, it will pollute parent directory.
Please, consider fix Start-PSPester to understand both -Publish and no-publish options.
It could be as simple as add -Publish switch.
There was a problem hiding this comment.
I open a separate issue #2720 to track the problem in Start-PSPester. For now, the workaround works.
There was a problem hiding this comment.
Ok, lets merge the Fix in #2723 and we can proceed with your changes then.
Please revert back 969ac05d706d968eb534e886b5a5b9a4ce14a5bc
|
Jianyun (@jianyunt) to avoid this in the future, please join Microsoft GitHub organization and make your membership public. |
There was a problem hiding this comment.
this is not needed as we are registering only if we there is no existing repo with the same source location.
There was a problem hiding this comment.
If the repository exists, $needRegister is false. This code won't get executed.
Only the case when the same repo exists but is pointing to some other source location.
In reply to: 88761457 [](ancestors = 88761457)
There was a problem hiding this comment.
can be simplified with below
log "Unregistering PSRepository with name: $RepositoryName"
PowerShellGet\Get-PSRepository -Name $RepositoryName -ErrorAction SilentlyContinue | PowerShellGet\UnRegister-PSRepository -Name $RepositoryName
There was a problem hiding this comment.
|
|
| # Check if the PackageManagement works in the base-oS or PowerShellCore | ||
| $PSHome | ||
| $PSVersionTable | ||
| $env:PSModulePath |
There was a problem hiding this comment.
It's better to remove these lines. They will pollute the test output.
| $publishPath = Split-Path $Options.Output -Parent | ||
| log "Restore PowerShell modules to $publishPath" | ||
| Restore-PSModule -Name PackageManagement -Destination (Join-Path -Path $publishPath -ChildPath "Modules") | ||
| Restore-PSModule -Name PowerShellGet -Destination (Join-Path -Path $publishPath -ChildPath "Modules") |
There was a problem hiding this comment.
Can you, please, make Name parameter a string[] and pass an array of strings
No errors if brew dependencies already present

Removed PackageManagement source code
Removed existing PackageMangement test code and replace with 8 tests case as acceptance test.
Use Save-Module to pull down PackageMangement from myget.
Changed to alpha.11 in download.sh to enable use PowerShellGet and OneGet in the build
Fix
Issue #1355
Issue #2347