dvdciri / daggraph

Dagger dependency graph generator for Android Developers
MIT License
1.15k stars 58 forks source link

Does not work when specifying path to the project root #20

Closed Petrulak closed 6 years ago

Petrulak commented 6 years ago

It doesn not work if i provide a path (myProject/) to my Kotlin project. The path in error below is incorrect, should be : /Users/mato/myProject/build/dependency_bubble_graph.html. instead of /Users/mato/build/dependency_bubble_graph.html.

Martins-MacBook-Pro:~ mato$sudo daggraph myProject/
Analyzing dagger components and modules..

? What kind of chart do you want to generate? Bubble chart

All done! The chart was saved in /Users/mato/build/dependency_bubble_graph.html. Opening..
The file /Users/mato/build/dependency_bubble_graph.html does not exist.
child_process.js:614
    throw err;
    ^

Error: Command failed: open /Users/mato/build/dependency_bubble_graph.html
The file /Users/mato/build/dependency_bubble_graph.html does not exist.

at checkExecSyncError (child_process.js:574:11)
at execSync (child_process.js:611:13)
at /usr/local/lib/node_modules/daggraph/src/router.js:94:5
at fs.js:1294:7
at FSReqWrap.oncomplete (fs.js:149:15)
dvdciri commented 6 years ago

Thanks for the issue, apparently there is an issue with the relative path. Creating a PR with a fix right now.

dvdciri commented 6 years ago

@Petrulak Can you pease download develop and check if this issue has been fixed correctly? Or share more info about it

dvdciri commented 6 years ago

Also, can you try the same scenario with a project that doesn't contain Kotlin as it is not supported at them moment. So, closing this as it won't work anyway with your example right now.