nw.js: process.cwd() returns wrong path
Shouldn’t process.cwd()
return the directory the user is currently at? It seems to always return the path where the app source lives regardless of where the user is running it from.
<bountysource-plugin>
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource. </bountysource-plugin>
About this issue
- Original URL
- State: closed
- Created 11 years ago
- Comments: 27 (3 by maintainers)
The problem still exists. Are there some clues for its solution?
When I run
nw app/
,process.cwd()
return the right path. But after i package my app with grunt-node-webkit-builder, theprocess.cwd
return a wrong path.It should not return like this:
It should return: (nw.exe is in test folder)
Do I miss something important? How to fix it?
Will provide a way. Thanks.