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

Error when Get-FolderSize is executed in / on linux and Mac #29

Open
aristosvo opened this issue Aug 24, 2021 · 2 comments
Open

Error when Get-FolderSize is executed in / on linux and Mac #29

aristosvo opened this issue Aug 24, 2021 · 2 comments

Comments

@aristosvo
Copy link

aristosvo commented Aug 24, 2021

On linux and Mac I've an error showing up when the command is triggered in /.

Setup:

PS /> Get-Host | Select-Object Version

Version
-------
7.1.4
PS /> (Get-Location)

Path
----
/

Command and Error:

PS /> (Get-FolderSize -FolderName 'etc') 
Split-Path: /root/.local/share/powershell/Modules/PSFolderSize/1.7.1/Functions/Private/Get-FolderList.ps1:72
Line |
  72 |          $splitPath = Split-Path -Path $BasePath
     |                       ~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Cannot process argument because the value of argument "path"
     | is not valid. Change the value of the "path" argument and run
     | the operation again.

Workaround:

PS /> (Get-FolderSize -FolderName 'etc' -Path '.')

FolderName                     SizeMB       SizeGB       FullPath
----------                     ------       ------       --------
etc                            3.37         0            /etc
@cengbrecht
Copy link

Oh, I like this issue and fix.
I think this would be great for simplifying how to search folder sizes in Linux.
though there are a thousand tools for it, they are not as universal in many cases.

@gngrninja
Copy link
Owner

Taking a look at this next! Thanks for the information.

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

3 participants