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

Destination directory is not recursively created if 'to' asset path is not a directory #99

Open
KKoukiou opened this issue Mar 3, 2023 · 4 comments
Labels

Comments

@KKoukiou
Copy link

KKoukiou commented Mar 3, 2023

I have an asset that looks like this:
{
from: '/home/kkoukiou/repos/cockpit/node_modules/@patternfly/patternfly/assets/fonts/RedHatFont-updated/RedHatText/RedHatText-updated-Bold.woff2',
to: '/home/kkoukiou/repos/cockpit/dist/static/fonts/RedHatText-Bold.woff2'",
}

The ./dist/static/fonts directory does not exist and therefore the plugin fails with: text: "ENOENT: no such file or directory, copyfile ...

If I use directory for the 'to' path it works, but I need to rename the asset so this is not a solution.

I believe this conditional directory creation could be removed

@KKoukiou KKoukiou changed the title Dest directory is not recursively created if 'to' asset path is not a directory Destination directory is not recursively created if 'to' asset path is not a directory Mar 3, 2023
@linbudu599
Copy link
Member

Could u please try the way as #100 first? It seems like you're both using absolute paths.

@KKoukiou
Copy link
Author

@linbudu599 hi, I meantioned above, 'If I use directory for the 'to' path it works, but I need to rename the asset so this is not a solution.'

@linbudu599
Copy link
Member

This should be fixed in 2.1.1, the dir only condition was removed so it works fine now, please try again.

@martinpitt
Copy link

Excellent, works fine @linbudu599 . Thank you!

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

No branches or pull requests

3 participants