majkinetor / au

Chocolatey Automatic Package Updater Module
GNU General Public License v2.0
227 stars 71 forks source link

fix sourcing #214

Closed jetersen closed 4 years ago

jetersen commented 4 years ago

in newer version of Windows PowerShell the . $_ does not actually source the files.

Chose to expand aliases as well.

Instead what happens is powershell will echo the get-childitem to terminal:

> $PSVersionTable.PSVersion                                                                                             
Major  Minor  Build  Revision
-----  -----  -----  --------
5      1      19041  1

> Import-Module au

   Directory: C:\Users\joseph\Documents\PowerShell\Modules\AU\2019.5.22\Private

AUPackage.ps1    AUVersion.ps1    check_url.ps1    is_url.ps1       is_version.ps1   request.ps1

   Directory: C:\Users\joseph\Documents\PowerShell\Modules\AU\2019.5.22\Public

Get-AUPackages.ps1                      Get-RemoteChecksum.ps1                  Get-RemoteFiles.ps1
Get-Version.ps1                         Push-Package.ps1                        Set-DescriptionFromReadme.ps1
Test-Package.ps1                        Update-AUPackages.ps1                   Update-Package.ps1
jetersen commented 4 years ago

@majkinetor thanks for merging, also thanks for fixing the build 😅

majkinetor commented 4 years ago

No problem. Do you have any link with more information about this pwsh change ?

jetersen commented 4 years ago

this was not a pwsh change 😅 I was using PowerShell 5 as you can see in snippet I gave.

Yes it is a newer build as it matches closely with OS build I am currently on Windows 10 20H2 19042.450 not sure if Windows PowerShell has an official changelog.

> $PSVersionTable.PSVersion                                                                                             
Major  Minor  Build  Revision
-----  -----  -----  --------
5      1      19041  1
majkinetor commented 4 years ago

Not sure if that was really so, but who cares, if it works for you now.

Such a major breaking change would without even minor version update is suspicious.