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

Convert file path to a string to avoid "Warning: Path must be a string" #44

Closed
wants to merge 1 commit into from

Conversation

securityvoid
Copy link

If "isPath" is set, I had problems with grunt.file.expand returning an array, which grunt.dirname did not appear to like and threw out the error:

Warning: Path must be a string. Received [ 'index.html' ] Use --force to continue.

Converting the array to a String with toString seems to solve the issue. In addition if there are older versions of grunt/node that aren't having grunt.file.expand pass an array, calling toString() on a String should have no effect. This should make this backwards compatible.

…g. Received [ 'index.html' ] Use --force to continue."
@niemyjski
Copy link
Collaborator

This has been fixed in the latest push, thanks for the pr.

@niemyjski niemyjski closed this Jun 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants