Using an exec test action, how can I set the curre...
# 🤖|ask-kapa
g
@microscopic-river-74022 Using an exec test action, how can I set the current working directory that the command will be run within?
m
Please stand by @glamorous-kangaroo-20427 as I search the knowledge base. I normally take about 15 seconds or so. :wave:
---------------------- In an
exec
test action, the current working directory where the command will be run is determined by the
build
field and the
buildAtSource
directive of the referenced Build action. By default, if a Build is referenced in the
build
field, the command will be run from the build directory for that Build action. If that Build has
buildAtSource: true
set, the command will be run from the source directory of the Build action. If no
build
reference is set, the command is run from the source directory of this action. Here is an example of how you can set the command in an
exec
test action:
Copy code
yaml
spec:
  command:
    - "npm"
    - "run"
    - "build"
Please note that the command is an array and is required for the
exec
test action. For more information, you can refer to the Garden documentation on exec Test (). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
message has been deleted