Skip to content

Instantly share code, notes, and snippets.

@cabrel
Created March 29, 2013 16:15
Show Gist options
  • Save cabrel/5271848 to your computer and use it in GitHub Desktop.
Save cabrel/5271848 to your computer and use it in GitHub Desktop.
yeoman generator patch
--- /usr/lib/node_modules/yo/node_modules/yeoman-generator/lib/actions/file.js 2013-01-26 18:40:49.000000000 -0500
+++ node_modules/generator-angular/node_modules/yeoman-generator/lib/actions/file.js 2013-03-29 12:09:00.289071681 -0400
@@ -29,7 +29,11 @@
file.expandFiles = function expandFiles(pattern, options) {
var cwd = options.cwd || process.cwd();
return this.expand(pattern, options).filter(function (filepath) {
- return fs.statSync(path.join(cwd, filepath)).isFile();
+ if (file.isPathAbsolute(filepath)) {
+ return fs.statSync(filepath).isFile();
+ } else {
+ return fs.statSync(path.join(cwd, filepath)).isFile();
+ }
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment