#Outputs with tty logger

1 messages · Page 1 of 1 (latest)

edgy elm
#

I am referencing https://docs.dagger.io/sdk/cue/490715/handling-outputs/#controlling-the-output but I can't get anything to output to the console like the Field Value part shows. Do most actions have a result field?
I am trying this dagger do bash_only_img --no-cache --output "" --output-format plain with

    _op: {
        alpine.#Build & {
                version: "3.16.2@sha256:1304f174557314a7ed9eddb4eab12fed12cb0cd9809e4c28f29af86979a3c870"
                packages: {
                    bash: _
                    yq:   _
                }
            }
    }
    out1: _op.output
}```
The only thing printed is `[:heavy_check_mark:] actions.bash_only_img`
I was expecting to see out1 with something printed.
What am I doing wrong?

The Dagger CUE SDK tries to detect which fields are outputs in an action. Simple values like strings, numbers and booleans are printed directly to the console, as you can see when the todo app example finishes:

cedar coyote
#

On the first paragraph of that doc it reads "Simple values like strings, numbers and booleans are printed directly to the console". So anything else is just skipped.