Files
vim-lsp-settings-mirror/installer/install-powershell-languageserver.cmd
Dominic Della Valle 78539e17f2 Fix installer for Powershell-languageserver (#319)
- Only create the `session` directory if it doesn't exist (suppresses
  "already exists" error from `mkdir`)
- Removes path delimiter conversion (paths now stay as `\` delimited)
- Quotes all `powershell` arguments to handle whitespace in paths (this
  uses CMD syntax for `Command` and Powershell syntax for the remainder
of the line. This is because everything past the Command argument is
interpreted by Powershell, but not before or during the parsing of
`-Command` itself)
2020-10-09 22:10:13 +09:00

21 lines
909 B
Batchfile

@echo off
setlocal
set VERSION=2.1.0
curl -L -o PowerShellEditorServices.zip "https://github.com/PowerShell/PowerShellEditorServices/releases/download/v%VERSION%/PowerShellEditorServices.zip"
call "%~dp0\run_unzip.cmd" PowerShellEditorServices.zip
del PowerShellEditorServices.zip
if not exist "%~dp0session" mkdir "%~dp0session"
echo @echo off^
setlocal^
set PSES_BUNDLE_PATH=%%~dp0PowerShellEditorServices^
set SESSION_TEMP_PATH=%%~dp0session^
powershell -NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command ^"%%PSES_BUNDLE_PATH: =` %%\PowerShellEditorServices\Start-EditorServices.ps1^" -BundledModulesPath '%%PSES_BUNDLE_PATH%%' -LogPath '%%SESSION_TEMP_PATH%%\logs.log' -SessionDetailsPath '%%SESSION_TEMP_PATH%%\session.json' -FeatureFlags @() -AdditionalModules @() -HostName 'My Client' -HostProfileId 'myclient' -HostVersion 1.0.0 -Stdio -LogLevel Normal^
> powershell-languageserver.cmd