gruntjs / grunt-init

Generate project scaffolding from a template.
http://gruntjs.com/project-scaffolding
MIT License
193 stars 58 forks source link

Specifying an invalid license throws "Arguments to path.join must be strings" #75

Closed soundasleep closed 10 years ago

soundasleep commented 10 years ago

If during init, you specify an "invalid" license, the only error message that is displayed is:

Fatal error: Arguments to path.join must be strings
TypeError: Arguments to path.join must be strings
    at f (path.js:204:15)
    at Object.filter (native)
    at Object.exports.join (path.js:209:40)
    at Object.file.isPathAbsolute (C:\Users\Jevon\AppData\Roaming\npm\node_modules\grunt-init\node_modules\gru
nt\lib\grunt\file.js:405:28)
    at Object._.extend.copy (C:\Users\Jevon\AppData\Roaming\npm\node_modules\grunt-init\tasks\init.js:352:25)
    at C:\Users\Jevon\AppData\Roaming\npm\node_modules\grunt-init\tasks\init.js:391:16
    at Array.forEach (native)
    at Object._.extend.copyAndProcess (C:\Users\Jevon\AppData\Roaming\npm\node_modules\grunt-init\tasks\init.j
s:376:28)
    at C:\rabid\grunt-plugin-template\template.js:80:10
    at C:\Users\Jevon\AppData\Roaming\npm\node_modules\grunt-init\tasks\lib\prompt.js:136:13

If the specified license file does not exist, it should say something to this effect.

(Using Windows 7 x64, node v0.10.26, npm 1.4.4)

maxleiko commented 10 years ago

Same here.

Ugly workaround: say that your license is MIT, then change it once your plugin is bootstrapped

vladikoff commented 10 years ago

Thanks, we need to look into this. PRs welcome.

vladikoff commented 10 years ago

Should be fixed in 0.3.2!