I've got a quick tweak to the readme - since this is for WSL/Windows 10 we can expect at least PowerShell 5 so invoke-webrequest/invoke-restmethod are present.
I stripped some of the nested functions out of the powershell script. since this is a one-off install script that is pulled down when needed, we don't need to pollute the function space (and actually shadow an built in function expand-archive). If this were going to be a module that was published, I'd refactor to more small functions.
I also changed the logging to write-progress rather than write-host (and made some comments logging statements). You could also change it to write-verbose or write-debug.
Anyway.. take what you like and disregard what you don't. ;)
I've got a quick tweak to the readme - since this is for WSL/Windows 10 we can expect at least PowerShell 5 so
invoke-webrequest
/invoke-restmethod
are present.I stripped some of the nested functions out of the powershell script. since this is a one-off install script that is pulled down when needed, we don't need to pollute the function space (and actually shadow an built in function
expand-archive
). If this were going to be a module that was published, I'd refactor to more small functions.I also changed the logging to
write-progress
rather thanwrite-host
(and made some comments logging statements). You could also change it towrite-verbose
orwrite-debug
.Anyway.. take what you like and disregard what you don't. ;)