mirror of
https://github.com/Hopiu/djLint.git
synced 2026-03-17 05:50:24 +00:00
fix(windows+py3.9): fixed an issue on windows with py3.9 and stdin
On windows python 3.9 the stdin path of - was "sometimes" recognized as the cwd, and sometimes as the system root. This update sets the cwd manually for paths of -. re https://github.com/monosans/djlint-vscode/issues/83
This commit is contained in:
parent
4a0bee6dc2
commit
280e1fc29c
1 changed files with 4 additions and 1 deletions
|
|
@ -220,7 +220,10 @@ class Config:
|
|||
self.lint = lint
|
||||
self.warn = warn
|
||||
|
||||
self.project_root = find_project_root(Path(src))
|
||||
if src == "-":
|
||||
self.project_root = find_project_root(Path.cwd())
|
||||
else:
|
||||
self.project_root = find_project_root(Path(src))
|
||||
|
||||
djlint_settings = load_project_settings(self.project_root, configuration)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue