Commit 37b62e51 authored by Bruce Dawson's avatar Bruce Dawson Committed by LUCI CQ

Get roll-dep to handle \ separators

roll-dep.py helpfully trims both trailing '/' and trailing '\'
characters, however it then fails if there are any '\' characters
embedded in the path. We can make this script friendlier for Windows
users by replacing '\' with '/'.

This was manually tested with a deps-roll of src\native_client.

Change-Id: I8fbd3395364612c85db39b234ee7dcbda705d0b7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2260997Reviewed-by: 's avatarEdward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
parent b7db183f
......@@ -221,7 +221,7 @@ def main():
gclient_root = gclient(['root'])
current_dir = os.getcwd()
dependencies = sorted(d.rstrip('/').rstrip('\\') for d in args.dep_path)
dependencies = sorted(d.replace('\\', '/').rstrip('/') for d in args.dep_path)
cmdline = 'roll-dep ' + ' '.join(dependencies) + ''.join(
' --key ' + k for k in args.key)
try:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment