skia2/infra/bots/recipe_modules/git/api.py
Ben Wagner a0dbedf089 [recipes] Fix Windows pathsep; add Windows tests
Change-Id: Ie74bc321dcd1a9150b55b36278e94acf1df34139
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/210220
Commit-Queue: Eric Boren <borenet@google.com>
Auto-Submit: Ben Wagner aka dogben <benjaminwagner@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
2019-04-24 19:53:28 +00:00

20 lines
591 B
Python

# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from recipe_engine import recipe_api
class GitApi(recipe_api.RecipeApi):
def env(self):
"""Add Git to PATH
Requires the infra/git and infra/tools/git CIPD packages to be installed
in the 'git' relative path.
"""
git_dir = self.m.path['start_dir'].join('git')
git_bin = git_dir.join('bin')
return self.m.env({'PATH': self.m.path.pathsep.join(
[str(git_dir), str(git_bin), '%(PATH)s'])})