File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515# specific language governing permissions and limitations
1616# under the License.
1717
18+ $InWindows = [System.Environment ]::OSVersion.Platform -eq ' Win32NT'
19+
1820$SUFFIX = " _windows_amd64"
1921$EXT = " .zip"
2022$CMD = " ops.exe"
2123
22- if (-not $IsWindows ) {
24+ if (-not $InWindows ) {
2325 $OS = (uname - s)
2426 $ARCH = (uname - m)
2527 $CMD = " ops"
@@ -77,7 +79,7 @@ if (-not (Test-Path "$BinPath/$CMD*")) {
7779
7880# Check if the bin path is in the user's PATH
7981if (-not ($env: PATH -contains $BinPath )) {
80- if ($IsWindows ) {
82+ if ($InWindows ) {
8183 $existingPath = [System.Environment ]::GetEnvironmentVariable(" Path" , [System.EnvironmentVariableTarget ]::User)
8284 $newPath = " $BinPath ;$existingPath "
8385 [System.Environment ]::SetEnvironmentVariable(" Path" , $newPath , [System.EnvironmentVariableTarget ]::User)
You can’t perform that action at this time.
0 commit comments