supnate / rekit-sublime

Sublime text plugin for Rekit.
MIT License
5 stars 0 forks source link

Right click menu does not work (Different cause than #1) #3

Open thehig opened 7 years ago

thehig commented 7 years ago

I'm having the same problem as https://github.com/supnate/rekit-sublime/issues/1 but I think it may have a different cause.

So, the right-click commands in sublime on Windows 10 are not working for me. If I run the npm scripts to add items, everything works just fine (great tool btw).

The first thing I tried to do is to open the config file for rekit, but to my surprise there is no rekit folder in my packages folder.

image

But as you can see from the next image, I have the Rekit.sublime-package installed

image

My initial suspicion is that something during the installation is going wrong and the config files/folders are not being created

supnate commented 7 years ago

Hi, @thehig , so you can see Rekit menu items but they don't work? If not then the plugin was not installed successfully.

BTW, I'm just in heavy development for Rekit 2.0 with some great new features. Then the plugin will also be updated. So I may investigate on this issue later.

thehig commented 7 years ago

No problem.

So yes, I can see the Rekit menu items in the right click menu, but not in any settings or packages menus.

I've just done a manual installation and the same exact things are happening, although at least now I can get into the .py file to try and figure out whats going on

thehig commented 7 years ago

Well, I was wrong. This is caused by the same thing as #1. I am still a little unsure of why the package did not seem to be in my packages folder, and why there's no config file by default. However, with the manual installation and the correction in sidebar.py from

p = subprocess.Popen(self.command, cwd=self.working_dir, env={'PATH': envPATH}, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, bufsize=1, startupinfo=si) to p = subprocess.Popen(self.command, cwd=self.working_dir, env=None, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, bufsize=1, startupinfo=si)

made everything seem to work just fine.

And for reference the envPATH it was using was C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Skype\Phone\;C:\ProgramData\chocolatey\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Users\thehig\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Users\thehig\AppData\Roaming\npm;C:\Program Files\Sublime Text 3

I would submit a pull request for this however the 'fix' will remove the users ability to specify any parameters in the config file as they will not get passed to process.Popen

supnate commented 7 years ago

Hi, @thehig, thank you very much for your investigation and I'm sorry for the trouble. Looking forward to your PR and I hope it also respects the user config since some people use nvm to manage node versions.

thehig commented 7 years ago

This and this seem relevant

thehig commented 7 years ago

Have a fix. Will submit PR tonight

thehig commented 7 years ago

Done and dusted. Might need some testing on non-windows platforms.