okibcn / wslcompact

Compacts the size of the ever-growing WSL vhdx images.
https://github.com/okibcn/wslcompact
GNU General Public License v3.0
805 stars 19 forks source link

Installation problem with Powershell 7.3.2 #5

Closed gabcavic closed 1 year ago

gabcavic commented 1 year ago

I have just tried to install the utility as a powershell module using Powershell 7.3.2. I correctly set the execution policy as specified in the installation guide. Nevertheless I get the following prompt

Downloading WslCompact...wget: Line | 45 | $ZIPURL=(wget -q https://api.github.com/repos/okibcn/wslcompact/relea … | ~~~~ | The term 'wget' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. wget: Line | 48 | wget -q $ZIPURL -O "$WCTEMP/wclatest.zip" | ~~~~ | The term 'wget' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. Done. Expand-Archive: Line | 50 | Expand-Archive -LiteralPath "$WCTEMP/wclatest.zip" -DestinationPath " … | ~~~~~~~~~~~~~~~~~ | The path 'C:\Users\gabriele\AppData\Local\Temp/wslcompacttemp/wclatest.zip' either does not exist or is not a valid file system path. Copy-Item: Line | 51 | Copy-Item "$WCTEMP/WslCompact" "$TARGET" -Force -Recurse | Out-Null | ~~~~~~~~~~~~ | Cannot find path 'C:\Users\gabriele\AppData\Local\Temp\wslcompacttemp\WslCompact' because it does not exist. WslCompact Module installed. Type wslcompact -h to know more about it.

Apparently powershell in my configuration does not recognize wget as a powershell cmdlet and this prevent the module to be installed as it can be seen from the subsequent lines. I am not an expert of powershell, so I have been asking to myself: "Is this a problem with my configuration?". Have you ever faced this issue? Do you know a possible workaround?

okibcn commented 1 year ago

@gabcavic, It should be fixed now.

Thanks for letting me know.