@@ -248,7 +248,7 @@ func compileFileWithRecipe(ctx *types.Context, sourcePath *paths.Path, source *p
248
248
return nil , errors .WithStack (err )
249
249
}
250
250
if ! objIsUpToDate {
251
- _ , _ , err := ExecRecipe (ctx , properties , recipe , utils .ShowIfVerbose /* stdout */ , utils .Show /* stderr */ )
251
+ _ , _ , _ , err := ExecRecipe (ctx , properties , recipe , utils .ShowIfVerbose /* stdout */ , utils .Show /* stderr */ )
252
252
if err != nil {
253
253
return nil , errors .WithStack (err )
254
254
}
@@ -479,22 +479,23 @@ func ArchiveCompiledFiles(ctx *types.Context, buildPath *paths.Path, archiveFile
479
479
properties .SetPath (constants .BUILD_PROPERTIES_ARCHIVE_FILE_PATH , archiveFilePath )
480
480
properties .SetPath (constants .BUILD_PROPERTIES_OBJECT_FILE , objectFile )
481
481
482
- if _ , _ , err := ExecRecipe (ctx , properties , constants .RECIPE_AR_PATTERN , utils .ShowIfVerbose /* stdout */ , utils .Show /* stderr */ ); err != nil {
482
+ if _ , _ , _ , err := ExecRecipe (ctx , properties , constants .RECIPE_AR_PATTERN , utils .ShowIfVerbose /* stdout */ , utils .Show /* stderr */ ); err != nil {
483
483
return nil , errors .WithStack (err )
484
484
}
485
485
}
486
486
487
487
return archiveFilePath , nil
488
488
}
489
489
490
- func ExecRecipe (ctx * types.Context , buildProperties * properties.Map , recipe string , stdout int , stderr int ) ([]byte , []byte , error ) {
490
+ func ExecRecipe (ctx * types.Context , buildProperties * properties.Map , recipe string , stdout int , stderr int ) (* exec. Cmd , []byte , []byte , error ) {
491
491
// See util.ExecCommand for stdout/stderr arguments
492
492
command , err := PrepareCommandForRecipe (buildProperties , recipe , false )
493
493
if err != nil {
494
- return nil , nil , errors .WithStack (err )
494
+ return nil , nil , nil , errors .WithStack (err )
495
495
}
496
496
497
- return utils .ExecCommand (ctx , command , stdout , stderr )
497
+ outbytes , errbytes , err := utils .ExecCommand (ctx , command , stdout , stderr )
498
+ return command , outbytes , errbytes , err
498
499
}
499
500
500
501
const COMMANDLINE_LIMIT = 30000
0 commit comments