Skip to content

Commit

Permalink
output straight to stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
tedim52 committed Jul 2, 2024
1 parent d81f83b commit 01ae88e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ func (builtin *RunPythonCapabilities) Execute(ctx context.Context, _ *builtin_ar
if err != nil {
return "", stacktrace.Propagate(err, "error occurred while preparing the sh command to execute on the image")
}
fullCommandToRun := []string{shellWrapperCommand, "-c", commandToRun}
fullCommandToRun := []string{shellWrapperCommand, "-c", fmt.Sprintf("{ %v; echo; } %v %v %v", commandToRun, ">>", "/proc/1/fd/1", "2>&1")}

// run the command passed in by user in the container
runPythonExecutionResult, err := executeWithWait(ctx, builtin.serviceNetwork, builtin.name, builtin.wait, fullCommandToRun)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ func (builtin *RunShCapabilities) Execute(ctx context.Context, _ *builtin_argume
if err != nil {
return "", stacktrace.Propagate(err, "error occurred while preparing the sh command to execute on the image")
}
fullCommandToRun := []string{shellWrapperCommand, "-c", fmt.Sprintf("{ %v; } %v %v %v", commandToRun, ">>", "/tmp/task.log", "2>&1")}
fullCommandToRun := []string{shellWrapperCommand, "-c", fmt.Sprintf("{ %v; echo; } %v %v %v", commandToRun, ">>", "/proc/1/fd/1", "2>&1")}

// run the command passed in by user in the container
createDefaultDirectoryResult, err := executeWithWait(ctx, builtin.serviceNetwork, builtin.name, builtin.wait, fullCommandToRun)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const (
tiniEnabled = true
)

var runTailCommandToPreventContainerToStopOnCreating = []string{shellWrapperCommand, "-c", "touch /tmp/task.log && tail -F /tmp/task.log"}
var runTailCommandToPreventContainerToStopOnCreating = []string{"tail", "-f", "/dev/null"}

func parseStoreFilesArg(serviceNetwork service_network.ServiceNetwork, arguments *builtin_argument.ArgumentValuesSet) ([]*store_spec.StoreSpec, *startosis_errors.InterpretationError) {
var result []*store_spec.StoreSpec
Expand Down

0 comments on commit 01ae88e

Please sign in to comment.