fix(powershell_es): support whitespaces in paths (#2445)

The current configuration does not support whitespaces in paths, which
are sometimes present in Windows user profile paths
This commit is contained in:
fl3pp 2023-02-10 08:31:28 +01:00 committed by GitHub
parent aeb7606621
commit b5bb6e3d7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,7 +5,7 @@ local temp_path = vim.fn.stdpath 'cache'
local function make_cmd(new_config)
if new_config.bundle_path ~= nil then
local command_fmt =
[[%s/PowerShellEditorServices/Start-EditorServices.ps1 -BundledModulesPath %s -LogPath %s/powershell_es.log -SessionDetailsPath %s/powershell_es.session.json -FeatureFlags @() -AdditionalModules @() -HostName nvim -HostProfileId 0 -HostVersion 1.0.0 -Stdio -LogLevel Normal]]
[[& '%s/PowerShellEditorServices/Start-EditorServices.ps1' -BundledModulesPath '%s' -LogPath '%s/powershell_es.log' -SessionDetailsPath '%s/powershell_es.session.json' -FeatureFlags @() -AdditionalModules @() -HostName nvim -HostProfileId 0 -HostVersion 1.0.0 -Stdio -LogLevel Normal]]
local command = command_fmt:format(new_config.bundle_path, new_config.bundle_path, temp_path, temp_path)
return { new_config.shell, '-NoLogo', '-NoProfile', '-Command', command }
end