Skip to content

Commit

Permalink
Merge pull request #44 from godric-cz/patch-1
Browse files Browse the repository at this point in the history
Fix formatting when no project is loaded
  • Loading branch information
adael authored Feb 7, 2023
2 parents 894ec1b + 0b7c050 commit 9d9b3f0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions SublimePhpCsFixer.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ def fixer_possible_paths():
executable_name = "php-cs-fixer"

project_data = sublime.active_window().project_data()
project_path = project_data['folders'][0]['path']
paths.append(os.path.join(project_path, "vendor", "bin", executable_name))
if project_data:
project_path = project_data['folders'][0]['path']
paths.append(os.path.join(project_path, "vendor", "bin", executable_name))

if "COMPOSER_HOME" in os.environ:
paths.append(os.path.join(
Expand Down

0 comments on commit 9d9b3f0

Please sign in to comment.