-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Set cmd.Dir to an absolute path when we execute scripts #1774
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
db96142
to
c2cac53
Compare
6ad41e7
to
adf42d8
Compare
adf42d8
to
f88cf5e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
had a question, but otherwise looks good to me
runCache: runCache, | ||
logger: r.config.Logger, | ||
packageManager: packageManager, | ||
processes: r.processes, | ||
taskHashes: hashes, | ||
repoRoot: r.config.Cwd, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Saw some chatter about cwd
when turbo is run from a directory other than root of monorepo. Is r.config.Cwd
here always "root of monorepo" or can it be different?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we resolve Config.Cwd
to either the program's working directory, or the value of the --cwd
flag. In the upcoming cobra
port, this gets renamed to RepoRoot
to hopefully be more clear.
Setting
cmd.Dir
to an absolute path ensures that it will continue to work in the presence of the--cwd
flag.Bonus drop unused
turboCache
fromexecContext
.Note that this PR stacks on top of #1773