Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update-ZLocation $path should be mandatory #86

Closed
theaquamarine opened this issue Aug 21, 2019 · 1 comment
Closed

Update-ZLocation $path should be mandatory #86

theaquamarine opened this issue Aug 21, 2019 · 1 comment

Comments

@theaquamarine
Copy link
Collaborator

Found while investigating #84 and #85, but probably not their cause: $path on Update-ZLocation isn't mandatory or provided with a default, so it's possible to run just Update-ZLocation. This makes it to the database and breaks ZLocation. The same is true of Add-ZWeight etc.

PS H:\> z
Weight Path
------ ----
     1 H:\
PS H:\> Update-ZLocation
PS H:\> z
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
At C:\Program Files\WindowsPowerShell\Modules\ZLocation\1.2.0\ZLocation.Service.psm1:76 char:9
+         Write-Error $error[0]
+         ~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [], ArgumentOutOfRangeException
    + FullyQualifiedErrorId : System.ArgumentOutOfRangeException
@theaquamarine
Copy link
Collaborator Author

Fixed in #87

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant