github.com/ethanhsieh/snapd@v0.0.0-20210615102523-3db9b8e4edc5/packaging/build-tools/go (about)

     1  #!/usr/bin/python3
     2  # This wrapper is put in $PATH, ahead of the real "go" tool to work around
     3  # some, er, curious, choices done by the Debian packaging helper scripts that
     4  # pass verbose flag to "go generate" which in turns prints every single file in
     5  # the source tree on a separate line. This easily dominates the build log,
     6  # possibly exceeding the 4MB mark that travis chooses to keep by default.
     7  
     8  # The real go is passed as an environment variable SNAPD_VANILLA_GO.
     9  
    10  import sys 
    11  import os
    12  
    13  if __name__ == "__main__":
    14      go = os.getenv("SNAPD_VANILLA_GO")
    15      args = [arg for arg in sys.argv if arg != "-v"]
    16      os.execl(go, *args)