Index: infra/bots/assets/asset_utils.py |
diff --git a/infra/bots/assets/asset_utils.py b/infra/bots/assets/asset_utils.py |
index ae58d4539fbcf30fe55246daf4d3b8de41adc034..74407e25abaa19e0fe42792904580617b1422680 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] |