molovo / sublime-zsh

Provides native ZSH autocompletion and snippets
https://github.com/molovo/sublime-zsh
MIT License
10 stars 2 forks source link

[Errno 13] Permission denied #1

Open bofm opened 6 years ago

bofm commented 6 years ago

Sublime Text 3 build 3142 Mac OS Sierra

Console log:

Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 591, in on_query_completions
    res = callback.on_query_completions(v, prefix, locations)
  File "/Users/user/Library/Application Support/Sublime Text 3/Packages/ZSH/zsh.py", line 92, in on_query_completions
    completions = get_completions(view, prefix)
  File "/Users/user/Library/Application Support/Sublime Text 3/Packages/ZSH/zsh.py", line 45, in get_completions
    proc = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, startupinfo=info, cwd=workingDir)
  File "./python3.3/subprocess.py", line 819, in __init__
  File "./python3.3/subprocess.py", line 1448, in _execute_child
PermissionError: [Errno 13] Permission denied

chmod +x capture.zsh helped.

bofm commented 6 years ago

Maybe it would be better to call zsh capture.zsh in the subprocess.Popen

molovo commented 6 years ago

I haven't looked at this for quite a while since I switched to VS Code some time ago. I don't think the way the process is being called is an issue, I think the capture.zsh just needs to be re-added to the repository with the executable permission.

ratijas commented 3 years ago

It looks like executable bit is stripped off by Package Control itself. It is set on the file in this repository, but unset in the Packages/ZSH directory.

So, call to Popen should be changed to include "zsh" as its first element of cmd.

chmod +x of course works, but it's not an option for distributable package.