resolve script path duplication with relative SCRIPTFLOW_SCRIPTS_DIR#4
resolve script path duplication with relative SCRIPTFLOW_SCRIPTS_DIR#4mnikulin wants to merge 1 commit into
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdjusts script execution to avoid duplicating the scripts directory in the path by passing the relative script filename to the execution command while still using scriptsDir as the working directory. Sequence diagram for updated script execution path handlingsequenceDiagram
participant Caller
participant Handler as handleScriptRun
participant Builder as buildExecutionCommand
participant Executor as executeScript
Caller->>Handler: handleScriptRun(args, scriptsDir, timeout, config)
Handler->>Builder: buildExecutionCommand(scriptFile, language, scriptArgs)
Builder-->>Handler: command
Handler->>Executor: executeScript(command, scriptsDir, timeout, config.shellEnvironment)
Executor-->>Handler: output
Handler-->>Caller: { output, metadata }
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughRemoves the intermediate ChangesScript path simplification
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
When
SCRIPTFLOW_SCRIPTS_DIRwas set to a relative path, the script path passed to the shell command already includedscriptsDir, butexecSyncalso setcwdtoscriptsDir— causing the directory to be prepended twice.Fixed by passing
scriptFiledirectly tobuildExecutionCommandinstead ofpath.join(scriptsDir, scriptFile), sincecwdis already set toscriptsDir.Summary by Sourcery
Bug Fixes:
Summary by CodeRabbit