mkht / pspm

PowerShell Package Manager
MIT License
13 stars 1 forks source link

Failed to acquire module from GitHub in macOS #66

Closed mkht closed 6 years ago

mkht commented 6 years ago

In macOS with PSCore 6.1

PS> pspm install 'owner/repo'
Modules will be saved in "/Users/mkht/Documents/pspm/Modules"
Join-Path : Cannot bind argument to parameter 'Path' because it is null.
At /Users/mkht/Documents/pspm/functions/getModule.ps1:155 char:36
+     $TempDir = New-Item (Join-Path $env:TEMP '/pspm') -Force -ItemTyp ...
+                                    ~~~~~~~~~
+ CategoryInfo          : InvalidData: (:) [Join-Path], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Microsoft.PowerShell.Commands.JoinPathCommand

macOS環境には$env:TEMPが存在しないのが原因 $env:TEMPDIRとしなければいけない