gnarula / sublime-laravelgenerator

A Sublime Text Plugin which allows using Laravel 4 Generators by Jeffrey Way via the command palette.
165 stars 41 forks source link

Fixing multi-window projects #15

Closed gnatih closed 11 years ago

gnatih commented 11 years ago

I've added a parameter cwd=self.PROJECT_PATH to the subprocess.Popen to fix the multi-window issue.

gnarula commented 11 years ago

cwd parameter changes to the directory before executing the command. However, the arguments are constructed in such a way so that the artisan executable of the first directory in the "folders" is executed (have a look at line 25 of generate.py). Besides, If I have 2 separate windows with one laravel folder in each, the plugin currently generates the files in the respective folders.

If I interpreted it right, #12 aims at allowing 2 or more laravel folders in the same window. This is currently not possible since the path is determined using the first folder in the project (line no. 24). Unfortunately, the cwd parameter doesn't fix it.

gnatih commented 11 years ago

Yes, but this got the plugin working on my setup - Windows/Sublime 2/Cygwin, where I was having issues with running artisan from within Sublime. I guess you can merge it if it does not break it for other users. Thanks for the response and this useful plugin.

gnatih commented 11 years ago

Thanks again.