File: go

package info (click to toggle)
snapd 2.72-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 80,412 kB
  • sloc: sh: 16,506; ansic: 16,211; python: 11,213; makefile: 1,919; exp: 190; awk: 58; xml: 22
file content (16 lines) | stat: -rwxr-xr-x 637 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/python3
# This wrapper is put in $PATH, ahead of the real "go" tool to work around
# some, er, curious, choices done by the Debian packaging helper scripts that
# pass verbose flag to "go generate" which in turns prints every single file in
# the source tree on a separate line. This easily dominates the build log,
# possibly exceeding the 4MB mark that travis chooses to keep by default.

# The real go is passed as an environment variable SNAPD_VANILLA_GO.

import sys 
import os

if __name__ == "__main__":
    go = os.getenv("SNAPD_VANILLA_GO")
    args = [arg for arg in sys.argv if arg != "-v"]
    os.execl(go, *args)