Skip to content
This repository has been archived by the owner on Apr 11, 2022. It is now read-only.

process.cwd() not programmatically friendly #477

Open
cblanquera opened this issue Nov 12, 2014 · 3 comments
Open

process.cwd() not programmatically friendly #477

cblanquera opened this issue Nov 12, 2014 · 3 comments
Labels
Milestone

Comments

@cblanquera
Copy link

https://github.com/phonegap/phonegap-cli/blob/master/lib/phonegap/serve.js#L83

From what I understand cwd() was done because of https://github.com/phonegap/connect-phonegap/blob/master/lib/middleware/autoreload.js#L21

I created an issue on that found here:
phonegap/connect-phonegap#96

Probably a good fix once that issue is resolved would be

if (!options.projectDir && !project.cd({ emitter: self.phonegap, callback: callback })) return;

I know i should've forked this, but it's like a one liner :(

@mwbrooks
Copy link
Collaborator

Hi @cblanquera,

Totally agree with you! I'll queue this up to be fixed.

@ngryman
Copy link

ngryman commented Oct 20, 2016

Hi, any idea when this would be available?

It's really a blocker when you want to integrate it with parallel build systems. You can't process.chdir without messing up other tasks. Depending on cwd certainly makes sense for a CLI but is a really bad idea when you expose an programmatic API (i.e. connect-phonegap).
It totally defeats the purpose of using the API because obviously you want to integrate this with other tools that may need your cwd to stay where it is.

As @mwbrooks mentioned, it should be an easy fix with a maximum gain. Could you prioritize this? That would be awesome! 💖

@surajpindoria
Copy link
Collaborator

surajpindoria commented Oct 21, 2016

Hi @ngryman,

Thanks for bring this issue back up. I will put it on my todo list.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

4 participants