From ccb4c6244d063631dce8bfe788987b6f300f90ce Mon Sep 17 00:00:00 2001 From: James Shubin Date: Wed, 18 Sep 2024 21:39:03 -0400 Subject: [PATCH] engine: resources: exec: Improve the docs for a common scenario I knew this, and now you know it too! --- engine/resources/exec.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/engine/resources/exec.go b/engine/resources/exec.go index 0dd562f7..fcdcd401 100644 --- a/engine/resources/exec.go +++ b/engine/resources/exec.go @@ -83,7 +83,10 @@ type ExecRes struct { // Cwd is the dir to run the command in. If empty, then this will use // the working directory of the calling process. (This process is mgmt, - // not the process being run here.) + // not the process being run here.) Keep in mind that if you're running + // this command as a user that does not have perms to the current + // directory, you may wish to set this to `/` to avoid hitting an error + // such as: `could not change directory to "/root": Permission denied`. Cwd string `lang:"cwd" yaml:"cwd"` // Shell is the (optional) shell to use to run the cmd. If you specify