Bug Description
When a template is passed to rain deploy as an absolute path, the !Rain::S3 Run directive produces a doubled path, causing fork/exec to fail with "no such file or directory".
Steps to Reproduce
-
Template at /home/user/project/myapp/template.yml contains:
Code: !Rain::S3
Path: dist
Zip: true
BucketProperty: S3Bucket
KeyProperty: S3Key
Run: scripts/build.sh
-
Run from /home/user/project/:
rain deploy /home/user/project/myapp/template.yml my-stack -y
-
Rain resolves Run: scripts/build.sh relative to the template directory:
→ /home/user/project/myapp/scripts/build.sh (correct, absolute)
-
Rain then prepends the working directory to this already-absolute path:
→ /home/user/project/home/user/project/myapp/scripts/build.sh (doubled)
Error
error packaging template '/home/user/project/myapp/template.yml': fork/exec /home/user/project/home/user/project/myapp/scripts/build.sh: no such file or directory
Expected Behavior
Rain should detect that the resolved Run path is already absolute and skip prepending the working directory. The Path directive appears to have the same issue.
Workaround
Pass the template as a relative path instead of absolute:
rain deploy myapp/template.yml my-stack -y
Or run the build script externally before rain deploy and omit the Run directive.
Environment
- Rain version: latest (installed via Homebrew)
- OS: macOS (Darwin 25.3.0, arm64)
Bug Description
When a template is passed to
rain deployas an absolute path, the!Rain::S3Rundirective produces a doubled path, causingfork/execto fail with "no such file or directory".Steps to Reproduce
Template at
/home/user/project/myapp/template.ymlcontains:Run from
/home/user/project/:Rain resolves
Run: scripts/build.shrelative to the template directory:→
/home/user/project/myapp/scripts/build.sh(correct, absolute)Rain then prepends the working directory to this already-absolute path:
→
/home/user/project/home/user/project/myapp/scripts/build.sh(doubled)Error
Expected Behavior
Rain should detect that the resolved
Runpath is already absolute and skip prepending the working directory. ThePathdirective appears to have the same issue.Workaround
Pass the template as a relative path instead of absolute:
Or run the build script externally before
rain deployand omit theRundirective.Environment