1 #!/usr/bin/env vpython3
2 # Copyright 2023 The Chromium Authors
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5 """Print the default service account's auth token to stdout."""
7 from __future__ import absolute_import
12 sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__),
14 from common import DIR_SRC_ROOT
16 sys.path.append(os.path.join(DIR_SRC_ROOT, 'build'))
17 import find_depot_tools
21 luci_auth = os.path.join(find_depot_tools.DEPOT_TOOLS_PATH, 'luci-auth')
22 proc = subprocess.run([luci_auth, 'token'], encoding='utf-8')
23 return proc.returncode
26 if __name__ == '__main__':