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

Error when formatting while no folder is open #63

Open
alvv-z opened this issue Feb 14, 2022 · 1 comment
Open

Error when formatting while no folder is open #63

alvv-z opened this issue Feb 14, 2022 · 1 comment

Comments

@alvv-z
Copy link

alvv-z commented Feb 14, 2022

When formatting a file without an open folder, Sublime Text 3211 and 4126 show an error in the console. I haven't tested this in other Versions.

Console Output:

Traceback (most recent call last):
  File "/opt/sublime_text/Lib/python33/sublime_plugin.py", line 1456, in run_
    return self.run(**args)
  File "/home/$USER/.config/sublime-text-3/Installed Packages/Zig Language.sublime-package/Zig.py", line 149, in run
KeyError: 'folder'
@gnarz
Copy link

gnarz commented Mar 31, 2022

I have encountered the same issue. The problem is line 149 of Zig.py, which looks like this:
working_dir = vars.get('file_path', vars['folder'])
I removed the . vars['folder'] and it works again. This is probably not a proper fix, but this should be the place to fix it.

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