Closed dinhani closed 9 months ago
If the open succeeded, there's no much value in printing the path, but if the open failed, it would be wise to print the path instead, it can redirect the open error to stderr
and the HTML path to stdout
so that users can use it.
it only prints the HTML path in the temp folder because the file is always saved.
I though about this while doing it, and it might be wiser to redirect the the HTML output itself to stdout
rather than automatically dump it in a file. Something like:
dep-tree my/project/entrypoint --no-browser-open > ~/my-html-file.html
That way users have a more flexible way of dumping the file wherever they want to.
In WSL2, I don't have a GUI environment or browser, so it fails when trying to show the generated HTML.
I found out I can specify the
--no-browser-open
flag to bypass this behavior, but it only prints the HTML path in the temp folder because the file is always saved.Maybe it always should print the HTML path, no matter if the flag is specified or not?