github.com/bananabytelabs/wazero@v0.0.0-20240105073314-54b22a776da8/packaging/msi/verify_msi.cmd (about) 1 :: Copyright 2023 Tetrate 2 :: 3 :: Licensed under the Apache License, Version 2.0 (the "License"); 4 :: you may not use this file except in compliance with the License. 5 :: You may obtain a copy of the License at 6 :: 7 :: http://www.apache.org/licenses/LICENSE-2.0 8 :: 9 :: Unless required by applicable law or agreed to in writing, software 10 :: distributed under the License is distributed on an "AS IS" BASIS, 11 :: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 :: See the License for the specific language governing permissions and 13 :: limitations under the License. 14 15 :: verify_msi is written in cmd because msiexec doesn't agree with git-bash 16 :: See https://github.com/git-for-windows/git/issues/2526 17 @echo off 18 if not defined MSI_FILE set MSI_FILE=dist\wazero_dev_windows_amd64.msi 19 echo installing %MSI_FILE% 20 msiexec /i %MSI_FILE% /qn || exit /b 1 21 22 :: Use chocolatey tool to refresh the current PATH without exiting the shell 23 call RefreshEnv.cmd 24 25 echo ensuring wazero was installed 26 wazero version || exit /b 2 27 28 echo uninstalling wazero 29 msiexec /x %MSI_FILE% /qn || exit /b 3 30 31 echo ensuring wazero was uninstalled 32 wazero version && exit /b 4 33 :: success! 34 exit /b 0