mem-fs-editor's usage is broken in Pull request #129; passing filename as an array
See original GitHub issueGood day,
We find error at lib/ejs.js:529:68
— property this.opts.filename
could be Array and in this case we get this trace:
TypeError: this.opts.filename.replace is not a function
at Object.Template.generateSource (/home/dench/node_modules/generator-project-stub/node_modules/yeoman-generator/node_modules/mem-fs-editor/node_modules/ejs/lib/ejs.js:529:68)
at Object.Template.compile (/home/dench/node_modules/generator-project-stub/node_modules/yeoman-generator/node_modules/mem-fs-editor/node_modules/ejs/lib/ejs.js:444:12)
at Object.compile (/home/dench/node_modules/generator-project-stub/node_modules/yeoman-generator/node_modules/mem-fs-editor/node_modules/ejs/lib/ejs.js:289:16)
at handleCache (/home/dench/node_modules/generator-project-stub/node_modules/yeoman-generator/node_modules/mem-fs-editor/node_modules/ejs/lib/ejs.js:148:16)
at Object.exports.render (/home/dench/node_modules/generator-project-stub/node_modules/yeoman-generator/node_modules/mem-fs-editor/node_modules/ejs/lib/ejs.js:316:10)
at copy.process (/home/dench/node_modules/generator-project-stub/node_modules/yeoman-generator/node_modules/mem-fs-editor/actions/copy-tpl.js:14:18)
at applyProcessingFunc (/home/dench/node_modules/generator-project-stub/node_modules/yeoman-generator/node_modules/mem-fs-editor/actions/copy.js:13:16)
at EditionInterface.exports._copySingle (/home/dench/node_modules/generator-project-stub/node_modules/yeoman-generator/node_modules/mem-fs-editor/actions/copy.js:51:16)
at EditionInterface.<anonymous> (/home/dench/node_modules/generator-project-stub/node_modules/yeoman-generator/node_modules/mem-fs-editor/actions/copy.js:38:10)
at Array.forEach (native)
Issue Analytics
- State:
- Created 7 years ago
- Comments:18 (2 by maintainers)
Top Results From Across the Web
bash - Reading filenames into an array - Stack Overflow
Use echo "$BASH_VERSION" to show the version of your currently running shell (if it's Bash) and look at the output of ps -o...
Read more >Filename case changes broken in pull request.
A file rename only involving case changes doesn't show up properly in a pull request, even though they show correctly in the local...
Read more >Keep size of properties arrays balanced #129 - GitHub
My initial reaction was to avoid adding code to compensate for bad input data, but I thought about this more and decided that...
Read more >basename - Manual - PHP
Given a string containing the path to a file or directory, this function will return the trailing name component. Note: basename() operates naively...
Read more >How to use VBA to load filename strings into an array if contains
Hi All, I'm trying to automate the amalgamation of multiple data files into a single worksheet for simpler access.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@RyanZim no worries, these things happen. And fwiw I think you’re right, calling
render()
with afilename
array is very strange behavior that ejs probably shouldn’t be supporting.@mde No tag needed. I was just leaving it open for the benefit of others affected by this change.