You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The script is written to detect the operating system, but I presume this PowerShell script is really only intended for windows-based installation. The script could be simplified for that use case, unless you intend it to be usable for people running PowerShell on Linux. But for Linux users I'd assume the bash install script is preferable.
The Get-Arch function depends on the Get-WmiObject function which is only available in "PowerShell for Windows" and not in the PowerShell Core. Even if the script is intended only for windows installations, it should be assumed that developers are likely using the latest version of PowerShell Core. The Get-Arch function could be updated as follows:
The script downloads the windows_amd64.exe asset but then saves it as a .tar.gz file. The file should be saved as an .exe file. It does not need to be extracted from an archive. The script also assumes it can extract the file using tar which is not common on windows, but that is irrelevant, and that dependency should not be needed since the file downloaded is the raw executable.
The script stores the file in $env:APPDATA but it seems like it would be more typical to store it in a sub-folder beneath that location at least.
The script does not add the file location to the PATH. For completeness, either update the path or provide instructions to users that they'd need to edit their path themselves in order to use the tool from the terminal.
The text was updated successfully, but these errors were encountered:
The Komodor UI provides instructions on how to use port forwarding using the Komodor CLI:
However, there are several issues with your windows / powershell install script. It fails to run on powershell core on windows.
https://github.com/komodorio/komocli/blob/main/scripts/install.ps1
The script is written to detect the operating system, but I presume this PowerShell script is really only intended for windows-based installation. The script could be simplified for that use case, unless you intend it to be usable for people running PowerShell on Linux. But for Linux users I'd assume the bash install script is preferable.
The
Get-Arch
function depends on theGet-WmiObject
function which is only available in "PowerShell for Windows" and not in the PowerShell Core. Even if the script is intended only for windows installations, it should be assumed that developers are likely using the latest version of PowerShell Core. TheGet-Arch
function could be updated as follows:The script downloads the
windows_amd64.exe
asset but then saves it as a.tar.gz
file. The file should be saved as an.exe
file. It does not need to be extracted from an archive. The script also assumes it can extract the file usingtar
which is not common on windows, but that is irrelevant, and that dependency should not be needed since the file downloaded is the raw executable.The script stores the file in
$env:APPDATA
but it seems like it would be more typical to store it in a sub-folder beneath that location at least.The script does not add the file location to the PATH. For completeness, either update the path or provide instructions to users that they'd need to edit their path themselves in order to use the tool from the terminal.
The text was updated successfully, but these errors were encountered: