Describe the bug
I'm having issues using MacVim as a difftool via SmartGit on macOS. When MacVim is launched by SmartGit for comparing files, the system() call used by various plugins stops working. Instead, an error message is output saying:
E484: Can't open file /var/folders/<number>/<random temp folder name generated by macOS>/T/<short hash generated by Vim?>/<number>
for example when I tried it with --clean just now:
E484: Can't open file /var/folders/43/dt48k_4j735_5ffkh7jv72f0hdq8j2/T/vfiKbls/0
Launching Vim manually, either via MacOS (GUI) or the terminal (zsh) does not seem to yield this issue, so I'm suspecting it's related to it being launched by an another process (SmartGit in this case).
When searching around for this error message I found some people mentioning that setting set shell=/bin/bash fixes it, although that has no effect in my case (and also seemed to be related to using the fish shell which I'm not using). Some plugins also seem to change this variable so I don't know how reliable that is.
To Reproduce
Detailed steps to reproduce the behavior:
/usr/local/bin/mvim with the arguments --clean -d ${leftFile} ${rightFile}call system('ls') and notice the error aboveExpected behavior
The system() call works on macOS regardless of which program opens Vim.
Environment (please complete the following information):
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled May 26 2020 06:16:44)
macOS version
Included patches: 1-539
Compiled by Homebrew
macOS 10.15.4zsh20.1.2 #15149, installed: #15128Additional context
I'm unsure whether this is SmartGit-specific but I doubt it.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
@hlilje Please file MacVim bugs at https://github.com/macvim-dev/macvim/issues since they are not specific to core Vim. MacVim is a downstream fork of Vim and has specific code for handling OS integration.
Closed #6184.
closing then