Execute os file before Atoi execution
Signed-off-by: jffarge <slumbering.pierrot@gmail.com>
This commit is contained in:
parent
0e3ca30189
commit
40f132b77b
@ -2,6 +2,7 @@ package http
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"strconv"
|
||||
|
||||
"alpha.dagger.io/alpine"
|
||||
"alpha.dagger.io/dagger"
|
||||
@ -64,18 +65,23 @@ import (
|
||||
"""#
|
||||
}
|
||||
|
||||
response: {
|
||||
body: {
|
||||
os.#File & {
|
||||
from: ctr
|
||||
path: "/response"
|
||||
}
|
||||
}.contents @dagger(output)
|
||||
statusCode: {
|
||||
os.#File & {
|
||||
from: ctr
|
||||
path: "/status"
|
||||
}
|
||||
}.contents @dagger(output)
|
||||
|
||||
body: {
|
||||
os.#File & {
|
||||
from: ctr
|
||||
path: "/response"
|
||||
}
|
||||
}.contents @dagger(output)
|
||||
|
||||
// Force os.#File exec before Atoi
|
||||
response: {
|
||||
"body": body
|
||||
"statusCode": strconv.Atoi(statusCode)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user