diff options
Diffstat (limited to 'infra/bots/assets/asset_utils.py')
-rw-r--r-- | infra/bots/assets/asset_utils.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/infra/bots/assets/asset_utils.py b/infra/bots/assets/asset_utils.py index ae58d4539f..74407e25ab 100644 --- a/infra/bots/assets/asset_utils.py +++ b/infra/bots/assets/asset_utils.py @@ -38,6 +38,8 @@ TAG_PROJECT_SKIA = 'project:skia' TAG_VERSION_PREFIX = 'version:' TAG_VERSION_TMPL = '%s%%s' % TAG_VERSION_PREFIX +WHICH = 'where' if sys.platform.startswith('win') else 'which' + VERSION_FILENAME = 'VERSION' ZIP_BLACKLIST = ['.git', '.svn', '*.pyc', '.DS_STORE'] @@ -146,7 +148,10 @@ class CIPDStore(object): class GSStore(object): """Wrapper object for interacting with Google Storage.""" def __init__(self, gsutil=None, bucket=DEFAULT_GS_BUCKET): - gsutil = os.path.abspath(gsutil) if gsutil else 'gsutil' + if gsutil: + gsutil = os.path.abspath(gsutil) + else: + gsutil = subprocess.check_output([WHICH, 'gsutil']).rstrip() self._gsutil = [gsutil] if gsutil.endswith('.py'): self._gsutil = ['python', gsutil] |