lukeed / taskr

A fast, concurrency-focused task automation tool.
MIT License
2.53k stars 74 forks source link

Process.chdir impacts code outside of Fly #186

Closed Akkuma closed 7 years ago

Akkuma commented 8 years ago

I wrote a library that basically allows integration of web extensions within other web extensions and handles the heavy lifting of merging the child extensions into the parent. The first child extension to leverage this uses Fly and fly uses process.chdir, but never reverts it once its work is done. This impacts other code that expects process.cwd to remain correct.

There are two options that spring to mind. One retain a reference to the original process.cwd and switch back after tasks are ran. Two future don't change cwd, but pass along "cwd of fly" to code that requires it.

lukeed commented 8 years ago

@bucaran Wtf does "++" mean? These new labels are SO jarring. Caps for the loss 💀

ghost commented 8 years ago

Changed enhancement for ++. What do you want to call it? (Other than enhancement.)

lukeed commented 8 years ago

@bucaran imo, (please) leave everything lowercase. And ++ ==> feature, ? ==> maybe

ghost commented 8 years ago

@lukeed Sorry, I missed your reply. I'm fine with your name changes. I kinda like the names in uppercase, but you can make them lowercase if you prefer. 🙇

hzlmn commented 8 years ago

@lukeed What was the original purpose of process.chdir? I can't see any code dependent on process.cwd.

lukeed commented 8 years ago

@hzlmn I think it was to stay true to the this.root value, so that pathing & targeting worked correctly. Tbh, I'm not sure if it's still doing anything useful.