Skip to content

Commit

Permalink
fix script
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenWeatherford committed Jul 15, 2024
1 parent 4490ebf commit bfa4473
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
4 changes: 3 additions & 1 deletion src/vs-bicep/install.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ if errorlevel 2 goto end

echo.
echo Uninstalling current extension...
taskkill /im:Bicep.LangServer.exe /f
taskkill /im:devenv.exe /f
call "%VSIXInstallerExe%" /shutdownprocesses /quiet /uninstall:ms-azuretools.visualstudio-bicep

echo Installing extension...
call "%VSIXInstallerExe%" /force /shutdownprocesses /quiet "%BicepVsixPath%"
call "%VSIXInstallerExe%" /shutdownprocesses /quiet /force "%BicepVsixPath%"

:end
24 changes: 12 additions & 12 deletions src/vs-bicep/patch.cmd
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
@if (%_echo%)==() echo off
setlocal
@if "%_echo%"=="" echo off
setlocal enableextensions

set DEST=%1
set DEST="%~1"

if (%DEST%)==() (
if %DEST% equ "" (
goto help
)

if not exist "%DEST%\Bicep.VSLanguageServerClient.dll" (
if not exist "%DEST%\LanguageServer\Bicep.LangServer.exe" (
echo ** The specified location does not appear to be a valid Bicep for Visual Studio extension directory. **
echo.
goto help
)
)
if not exist %DEST%\Bicep.VSLanguageServerClient.dll goto badpath
if not exist %DEST%\LanguageServer\Bicep.LangServer.exe goto badpath
goto :start

:badpath
echo ** The specified location does not appear to be a valid Bicep for Visual Studio extension directory. **
echo.
goto help

:help
echo You can quickly patch an existing installation if you know the correct destination location
Expand All @@ -28,4 +29,3 @@ exit /b 1

xcopy /s Bicep.VSLanguageServerClient\bin\Debug\net472\*.* %DEST%
xcopy /s ..\Bicep.LangServer\bin\Debug\net8.0\*.* %DEST%\LanguageServer

0 comments on commit bfa4473

Please sign in to comment.