Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Error catched for returned promise. #65

Open
pascalduez opened this issue Feb 3, 2015 · 4 comments
Open

No Error catched for returned promise. #65

pascalduez opened this issue Feb 3, 2015 · 4 comments
Labels

Comments

@pascalduez
Copy link
Member

No .sassdoc destination dir exist.
env.theme('.sassdoc', env).catch(console.log); --> []

No theme/assets source dir exist.
env.theme('.sassdoc', env).catch(console.log); --> []

fs-extra dependency is 0.1.0 which is pretty low, latest is 0.16.3.
And in this version copy = ncp
There something screwed in the way ncp pass errors to callbacks.

Solution, uptate to [email protected]. At least there's an Error returned on source fail.

fs-extra.copy only error if the source is erroneous, if the destination does not exist it just silently exit.

Solution, add a fs.exist(dest) test before ?

@valeriangalliat valeriangalliat self-assigned this Feb 3, 2015
pascalduez added a commit that referenced this issue Feb 3, 2015
@valeriangalliat
Copy link
Member

fs-extra.copy only error if the source is erroneous, if the destination does not exist it just silently exit.

Even with updated version?

Why does it silently exists? The destination should be created if it doesnt exists.

@valeriangalliat valeriangalliat removed their assignment Feb 3, 2015
@pascalduez
Copy link
Member Author

Even with updated version?

Yes.

Why does it silently exists? The destination should be created if it doesnt exists.

This is a pretty edge case as we've seem in the tests yesterday.
SassDoc core should take care of it in most cases.

But basically nope, fse.copy does not create dest if it doesn't exist.

@valeriangalliat
Copy link
Member

Umpf it should throw an error in this case…

And by dest you mean the parent dir, not the actual copied dir/file?

@pascalduez
Copy link
Member Author

Umpf it should throw an error in this case…

That's what I think too.

And by dest you mean the parent dir, not the actual copied dir/file?

The directory where the documentation will be generated. In the tests case .sassdoc.

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

No branches or pull requests

2 participants