badmotorfinger / z

Save time typing out directory paths in PowerShell by jumping around instead.
The Unlicense
434 stars 33 forks source link

Error : Value cannot be null #43

Closed nabinked closed 5 years ago

nabinked commented 5 years ago

Installed inside WSL (Ubuntu 18.04). Powershell version 6.2.3 . Let me know if you need more info.

/mnt/c/Users/nabin.thapa> z group
Test-Path : Value cannot be null.
Parameter name: The provided Path argument was null or an empty collection.
At /home/nabin/.local/share/powershell/Modules/z/1.1.10/z.psm1:98 char:10
+     if ((Test-Path $cdHistory)) {
+          ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : InvalidArgument: (:) [Test-Path], ArgumentNullException
+ FullyQualifiedErrorId : NullPathNotPermitted,Microsoft.PowerShell.Commands.TestPathCommand

System.Management.Automation.ParameterBindingValidationException: Cannot bind argument to parameter 'FilePath' because it is null.
   at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
   at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
badmotorfinger commented 5 years ago

This script is not supported while running under Linux nor the cross platform PowerShell Core.

Happy to accept pull requests for this support :)