Skip to content

Commit

Permalink
Windows で動かない処理があるのを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
melpon committed Aug 26, 2024
1 parent 9ab5484 commit 98c6c8c
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,9 +364,16 @@ def apply_patch(patch, dir, depth):


def _deps_dirs(src_dir):
cap = cmdcap(["gclient", "recurse", "-j1", "pwd"])
if platform.system() == "Windows":
cap = cmdcap(["gclient", "recurse", "-j1", "cd"])
else:
cap = cmdcap(["gclient", "recurse", "-j1", "pwd"])
abs_dirs = cap.split("\n")
rel_dirs = [os.path.relpath(abs_dir, src_dir) for abs_dir in abs_dirs]
# Windows だと Updating depot_tools という行があったりするので、
# # 存在してるディレクトリのみを取り出して相対パスにする
rel_dirs = [
os.path.relpath(abs_dir, src_dir) for abs_dir in abs_dirs if os.path.exists(abs_dir)
]
return rel_dirs


Expand Down

0 comments on commit 98c6c8c

Please sign in to comment.