dfinke / InstallModuleFromGitHub

Install PowerShell Modules from GitHub
Apache License 2.0
87 stars 31 forks source link

Fixed extract logic #5

Closed jgigler closed 7 years ago

jgigler commented 7 years ago

Somewhere between the office and home, I screwed up the original PR. It was failing on expanding the archive and subsequently copying it to the proper module directory. I have now fixed that. I did just test on OSX and Ubuntu 16.04, and Windows 10.

However, one thing that I did not think through before I started this, is having the cross-platform support now makes this module require the Alpha release of Powershell 6.0. The boolean environment variables ($IsLinux, $IsWindows, $IsOSX) are only present in the 6.0 Alpha.

Feel free to rollback if so desired. I have this forked and can use the cross platform functionality that way.

cdhunt commented 7 years ago

$IsLinux and $IsOSX will evaluate to false because they return $null in previous versions. If the default conditions assume Windows and only change when either $isLinux or $IsOSX are true, you should be good in previous versions. You just can't rely on $IsWindows or you'll be stuck with v6+

jgigler commented 7 years ago

Updated pull request to implement @cdhunt 's suggestion. Tested successfully on OSX w/ 6.15 alpha and Powershell 5 on windows 10.

dfinke commented 7 years ago

Thanks, thanks for doing all the checks. Thanks @cdhunt for jumping in.