File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -325,12 +325,18 @@ module Shards
325325 path = local_path
326326 FileUtils .rm_r(path) if File .exists?(path)
327327 Dir .mkdir_p(path)
328- hg_retry(err: " Failed to clone #{ hg_url } " ) do
328+
329+ source = hg_url
330+ # Remove a "file://" from the beginning, otherwise the path might be invalid
331+ # on Windows.
332+ source = source[7 ..] if source.starts_with?(" file://" )
333+
334+ hg_retry(err: " Failed to clone #{ source } " ) do
329335 # We checkout the working directory so that "." is meaningful.
330336 #
331337 # An alternative would be to use the `@` bookmark, but only as long
332338 # as nothing new is committed.
333- run_in_current_folder " hg clone --quiet -- #{ Process .quote(hg_url )} #{ Process .quote(path)} "
339+ run_in_current_folder " hg clone --quiet -- #{ Process .quote(source )} #{ Process .quote(path)} "
334340 end
335341 end
336342
You can’t perform that action at this time.
0 commit comments