Skip to content
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

go#util#System is broken on Windows #986

Closed
vrischmann opened this issue Aug 1, 2016 · 2 comments · Fixed by #988
Closed

go#util#System is broken on Windows #986

vrischmann opened this issue Aug 1, 2016 · 2 comments · Fixed by #988

Comments

@vrischmann
Copy link
Contributor

Actual behavior

First symptom is that :GoFmt no longer works, I get a cryptic error:

Error detected while processing function <SNR>12_fmt_autosave..go#fmt#Format..go#util#System:
line    3:
E484: Can't open file C:\Users\Sphax\AppData\Local\Temp\VIoCBDF.tmp

I thought I screwed up something in my vimrc regarding temp directories or something, but I checked the usual stuff and it wasn't that.

By debugging the go#fmt#Format function I managed to track down the problem to the go#util#System function. I then checked the git history of that file and saw #967 which changed it, so I tried reversing the change and everything works fine.

I'm guessing /bin/sh won't work on Windows (my shell is cmd.exe).

Expected behavior

No errors.

Steps to reproduce:

  1. Open any .go file.
  2. run :GoFmt (or save)

Configuration

Minimal vimrc used:

filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#rc()

Plugin 'VundleVim/Vundle.vim'
Plugin 'fatih/vim-go'

filetype plugin indent on
syntax enable

Vim 7.4 for Windows, vim-go commit 3030ecc

@arp242
Copy link
Contributor

arp242 commented Aug 1, 2016

#988 should fix this. I don't have a Windows machine though, so I'm afraid I can't test this...

@vrischmann
Copy link
Contributor Author

Just tested your branch, works great now. Thanks !

@fatih fatih closed this as completed in #988 Aug 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants