@@ -166,14 +166,14 @@ func build(conf *Config, builderKey, gitSha string) error {
166166 gitArchiveCmd := repoCmd (repoDir , "git" , "archive" , "--format=tar.gz" , fmt .Sprintf ("--output=%s.tar.gz" , appName ), gitSha )
167167 gitArchiveCmd .Stdout = os .Stdout
168168 gitArchiveCmd .Stderr = os .Stderr
169- if err := gitArchiveCmd . Run ( ); err != nil {
169+ if err := run ( gitArchiveCmd ); err != nil {
170170 return fmt .Errorf ("running %s (%s)" , strings .Join (gitArchiveCmd .Args , " " ), err )
171171 }
172172 // tar -xzf ${APP_NAME}.tar.gz -C $TMP_DIR/
173173 tarCmd := repoCmd (repoDir , "tar" , "-xzf" , fmt .Sprintf ("%s.tar.gz" , appName ), "-C" , fmt .Sprintf ("%s/" , tmpDir ))
174174 tarCmd .Stdout = os .Stdout
175175 tarCmd .Stderr = os .Stderr
176- if err := tarCmd . Run ( ); err != nil {
176+ if err := run ( tarCmd ); err != nil {
177177 return fmt .Errorf ("running %s (%s)" , strings .Join (tarCmd .Args , " " ), err )
178178 }
179179
@@ -305,7 +305,8 @@ func build(conf *Config, builderKey, gitSha string) error {
305305 )
306306
307307 // Don't look for errors here. Buckets may already exist
308- makeBucketCmd .Run ()
308+ // https://github.com/deis/builder/issues/80 will eliminate this distaste
309+ run (makeBucketCmd )
309310
310311 // $MC_PREFIX cp ${APP_NAME}.tar.gz $TAR_URL &>/dev/null
311312 cpCmd := baseMinioCmd
@@ -316,7 +317,7 @@ func build(conf *Config, builderKey, gitSha string) error {
316317 tarURL ,
317318 )
318319 cpCmd .Dir = repoDir
319- if err := cpCmd . Run ( ); err != nil {
320+ if err := run ( cpCmd ); err != nil {
320321 return fmt .Errorf ("copying %s.tar.gz to %s (%s)" , appName , tarURL , err )
321322 }
322323
@@ -408,7 +409,7 @@ func build(conf *Config, builderKey, gitSha string) error {
408409 for {
409410 // for now, assume the error indicates that the slug wasn't there, nothing else
410411 // TODO: implement https://github.com/deis/builder/issues/80, which will clean this up siginficantly
411- if err := lsCmd . Run ( ); err == nil {
412+ if err := run ( lsCmd ); err == nil {
412413 break
413414 }
414415 }
0 commit comments