fix: run scripts in noninteractive shell (#1547) #1577
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Firenvim on Windows relys on powershell scripts to run registry keys installation and uninstallation. Here are the codes:
firenvim/autoload/firenvim.vim
Line 890 in 8c6c00a
firenvim/autoload/firenvim.vim
Line 958 in 8c6c00a
During debugging, I add
echo o
right after calling thesystem
function, which then shows errorBut weirdly,
v:shell_error
is still0
.PSReadline
is a module usually installed for interactive prompt usage.Powershell.exe
provides option-NonInterative
for running automated scripts in non-interactive shell. Adding the-NonInteractive
option fixes #1547 as the scripts run successfully without error.Note
This pull request only fixes firenvim installation on Windows host and
WSL2 environment. Uninstallation scripts run successfully when running firenvim on the host (
%LOCALAPPDATA/firenvim/*
files and corresponding registry keys are removed); runfirenvim#uninstall()
on WSL side only removes the binary in WSL(
stdpath('data')/firenvim
in WSL or$HOME/.local/share/firenvim/firenvim
)A separate issue #1576 tracks the uninstallation bug on WSL side