-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Symlink require administrator on Windows #122
Comments
And the suffix of the executable file require be
|
If you copy the file to |
vim work, nvim no work:
|
They can all work with vim-wakatime/scripts/install_cli.py Line 59 in 7a6d776
if is_win:
link += '.exe' |
How about now, after 3bdb70e? |
nvim no run install_cli.py |
|
What's your output when you run this in Vim and Nvim?
We can't assume |
In vim (MSYS2) echo &shell
" D:/msys64/usr/bin/zsh
echo &shellcmdflag
" -c In nvim (MSYS2) echo &shell
" D:/msys64/usr/bin/zsh
echo &shellcmdflag
" /s /c In vim (CMD) echo &shell
" C:\WINDOWS\system32\cmd.exe
echo &shellcmdflag
" /c In nvim (CMD) echo &shell
" cmd.exe
echo &shellcmdflag
" /s /c |
I just pushed 55d42cf. Can you update and see if it fixes things for you on Vim and Nvim? |
Also, thanks for |
In MSYS2
echo &shell
" D:/msys64/usr/bin/zsh
echo &shellcmdflag
" /s /c |
How about now after debf1ef? Thanks for helping debug this! |
in MSYS2 only nvim
in CMD
By the way,I python3 install by pacman on MSYS2. |
Some cleanup with 49591ed so now Vim and NVim both use the same command. Maybe this will help simplify debugging. Can you update and try it out? |
no change |
No, it has bug. |
The problem is in python.
|
So the path for After
|
no. |
Can you try now after 36f7f5c? |
no change |
That's strange, I thought it would be the fix. Can you add line: |
|
You've removed the override from before? Want to make sure this line is deleted: |
I'm not sure how it could remove the Maybe the |
Run console C:\Users\MoeShin>python3 C:/Users/MoeShin/.vim/plugged/vim-wakatime/scripts/install_cli.py
python3: can't open file '/c/Users/MoeShin/C:/Users/MoeShin/.vim/plugged/vim-wakatime/scripts/install_cli.py': [Errno 2] No such file or directory |
I'm sorry, I had a bug in my regex. Fixed with 1316c05. |
Run 1316c05
|
Can you re-run those tests with a0daba9? |
Also, would be helpful for each of the checkboxes above to have the values of |
Run a0daba9 echom '`'.&shell.'`+`'.&shellcmdflag.'`'
|
Currently this bug is caused by the python version (installed by pacman on msys2). And the msys2 installation folder can be customized https://www.msys2.org/.
|
Could you also run the same echo shell test with |
Oh, that makes things much more difficult. I'm just worried about overwriting We also can't run |
In vim(msys2) has('win32') == 0
has('unix') == 1 |
Or re-run with unix style path when python exit code == 2 |
Or override |
zsh+vim(msys2) echo &shell
" D:/msys64/usr/bin/zsh
echo &shellcmdflag
" -c zsh+vim(scoop) echo &shell
" D:/msys64/usr/bin/zsh
echo &shellcmdflag
" At startup:
" /c
" After startup:
" -c zsh+nvim(scoop) echo &shell
" D:/msys64/usr/bin/zsh
echo &shellcmdflag
" /s /c cmd+vim(msys2) echo &shell
" C:\WINDOWS\system32\cmd.exe
echo &shellcmdflag
" /c cmd+vim(scoop) echo &shell
" C:\WINDOWS\system32\cmd.exe
echo &shellcmdflag
" /c cmd+nvim(scoop) echo &shell
" cmd.exe
echo &shellcmdflag
" /s /c |
Can't overwrite |
if &shell =~ 'sh\(.exe\)\?$'
let &shellcmdflag = '-c'
endif |
if s:has_async
if !s:IsWindows()
let job_cmd = [&shell, &shellcmdflag, s:JoinArgs(cmd)]
elseif &shell =~ 'sh\(.exe\)\?$' " or &shell !~ 'cmd\(.exe\)\?$'
let job_cmd = [&shell, '-c', s:JoinArgs(cmd)]
else
let job_cmd = [&shell, &shellcmdflag] + cmd
endif
elseif s:nvim_async
if s:IsWindows()
let job_cmd = cmd
else
let job_cmd = [&shell, &shellcmdflag, s:JoinArgs(cmd)]
endif
endif |
That works for all variants? |
This way has bug in nvim. :!ls .
" no work: zsh:1: command not found: ls .
:!'ls .'
" no work: zsh:1: command not found: 'ls .'
:!"ls ."
" work |
Yes |
With that change, do we still need to replace |
Python msys still needs
|
Normal python does not need
|
Which of the variants from #122 (comment) or #122 (comment) are python msys? |
python doesn't affect these |
#122 (comment)
a0daba9 does not completely solve the first problem. If I use git-bash etc. |
Thanks again for your help fixing this! |
Thanks you. a17a436 only fix echo &shell
" D:/msys64/usr/bin/zsh
echo &shellcmdflag
" /s /c
echo system('ls .')
" /usr/bin/bash: /s: No such file or directory If overwrite vim-wakatime/plugin/wakatime.vim Line 771 in 441f5c7
In nvim, the type of cmd can be string or list. let &shellcmdflag = '-c'
echo system('ls .') " no work
echo system(['ls', '.']) " work function! g:System(cmd)
" cmd is list
let override = s:false
if has('nvim')
if has('win32') && &shell !~ 'cmd\(.exe\)\?$' && &shellcmdflag !~ '^\s*-'
let override = s:true
let _shellcmdflag = &shellcmdflag
let &shellcmdflag = '-c'
endif
else
let a:cmd = s:JoinArgs(a:cmd)
endif
let data = system(a:cmd)
if override
let &shellcmdflag = _shellcmdflag
endif
return data
endfunction |
Doesn't Nvim always have support for async? Then it would never reach |
ok |
We can:
~/.wakatime/wakatime-cli
vim-wakatime/scripts/install_cli.py
Lines 59 to 64 in 7a6d776
The text was updated successfully, but these errors were encountered: