aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2022-12-14 16:02:04 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2022-12-15 11:11:48 +0100
commit3f55d2fdef9e86b7588620dbc2caf1d8b82e2d4e (patch)
tree50a1ca838dc5b4936ea6669291f0777989f3d502
parent2e7fea6165537d879abed7c127db4e19919b9198 (diff)
qp5_tool: Fix root detection
When launched from a subdirectory: File "pyside-setup\build_scripts\qp5_tool.py", line 392, in <module> if str(cwd) == '/' or (IS_WINDOWS and len(cwd) < 4): Amends 84bcb12d69bb24869f263839c26a13c858ca050d. Task-number: PYSIDE-2080 Change-Id: I4be4296c19258b5f5407053215e46ef0b262e4f3 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
-rw-r--r--build_scripts/qp5_tool.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/build_scripts/qp5_tool.py b/build_scripts/qp5_tool.py
index 66b559d8f..4ec0d6396 100644
--- a/build_scripts/qp5_tool.py
+++ b/build_scripts/qp5_tool.py
@@ -389,7 +389,8 @@ if __name__ == '__main__':
while not Path(".git").exists():
cwd = Path.cwd()
- if str(cwd) == '/' or (IS_WINDOWS and len(cwd) < 4):
+ cwd_s = os.fspath(cwd)
+ if cwd_s == '/' or (IS_WINDOWS and len(cwd_s) < 4):
warnings.warn('Unable to find git root', RuntimeWarning)
sys.exit(-1)
os.chdir(cwd.parent)