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

"results_in_new_tab": true not working #96

Open
Rick-Lannan-A139973-AGL opened this issue May 17, 2018 · 3 comments
Open

"results_in_new_tab": true not working #96

Rick-Lannan-A139973-AGL opened this issue May 17, 2018 · 3 comments

Comments

@Rick-Lannan-A139973-AGL

The "results_in_new_tab": true setting isn't working. I can see the setting is applied by running Settings().get('results_in_new_tab') in the Console but it's not opening in a new tab. The following is being output into the Console when I run a gulp command:

Traceback (most recent call last):
File "C:\Users\Rick Lannan\AppData\Roaming\Sublime Text 3\Packages\Gulp\gulp.py", line 204, in task_list_callback
self.run_gulp_task()
File "C:\Users\Rick Lannan\AppData\Roaming\Sublime Text 3\Packages\Gulp\gulp.py", line 207, in run_gulp_task
task = self.construct_gulp_task()
File "C:\Users\Rick Lannan\AppData\Roaming\Sublime Text 3\Packages\Gulp\gulp.py", line 211, in construct_gulp_task
self.show_running_status_in_output_panel()
File "C:\Users\Rick Lannan\AppData\Roaming\Sublime Text 3\Packages\Gulp\gulp.py", line 234, in show_running_status_in_output_panel
self.show_output_panel("Running '%s'%s...\n" % (self.task_name, with_flag_text))
File "C:\Users\Rick Lannan\AppData\Roaming\Sublime Text 3\Packages\Gulp\base_command.py", line 78, in show_output_panel
new_tab_path = os.path.join(self.gulp_results_path(), "Gulp Results")
File "C:\Users\Rick Lannan\AppData\Roaming\Sublime Text 3\Packages\Gulp\base_command.py", line 90, in gulp_results_path
return next(folder_path for folder_path in self.searcheable_folders if self.working_dir.find(folder_path) != -1) if self.working_dir else ""

@Rick-Lannan-A139973-AGL
Copy link
Author

I'm on a windows machine and I was able to temporarily workaround the issue by replacing line 78 with:
new_tab_path = os.path.join(os.environ['USERPROFILE'], "Gulp Results")

Seems the error was coming was from the gulp_results_path function

@nicosantangelo
Copy link
Owner

Hello, thanks for the report!

gulp_results_path can definitely throw, but it really shouldn't in that scenario so, can I ask you for a favor? What's the value of self.sercheable_folders (typo fixed no master 😅 ) and working_dir here:

def gulp_results_path(self):
    print(self.searcheable_folders) # <--- here
    print(self.working_dir) # <--- here
    return next(folder_path for folder_path in self.searcheable_folders if self.working_dir.find(folder_path) != -1) if self.working_dir else ""

I don't have a Windows box handy and that would really help debugging, so I don't just add a try:except blind

Thanks!

@Rick-Lannan-A139973-AGL
Copy link
Author

They both have values. Here is the output
['C:\projects\AGL\AGL.Digital.Sitecore\src\Project\Primary\AGL.Digital.Web.Project.Primary.LivingStyleGuide\styleguide']
C:\projects\AGL\AGL.Digital.Sitecore\src\Project\Primary\AGL.Digital.Web.Project.Primary.LivingStyleGuide

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

No branches or pull requests

2 participants