godot-gdscript-toolkit icon indicating copy to clipboard operation
godot-gdscript-toolkit copied to clipboard

Wildcards don't work on Windows

Open Awkor opened this issue 5 years ago • 1 comments
trafficstars

E:\>gdformat *.gd
Traceback (most recent call last):
  File "C:\Program Files (x86)\Python37-32\Scripts\gdformat-script.py", line 11, in <module>
    load_entry_point('gdtoolkit==3.2.4', 'console_scripts', 'gdformat')()
  File "c:\program files (x86)\python37-32\lib\site-packages\gdtoolkit\formatter\__main__.py", line 91, in main
    with open(file_path, "r+") as fh:
OSError: [Errno 22] Invalid argument: '*.gd'

This is because the Windows console doesn't expand wildcards, but passes them directly to the script.

I'm no Python expert, but looking around I read that the glob module could be used to solve this issue.

I'll also use this issue to thank the developer and contributors of this amazing project!

Awkor avatar Feb 08 '20 15:02 Awkor

Thanks! This is good idea.

Scony avatar Feb 08 '20 18:02 Scony