Skip to content
This repository was archived by the owner on Mar 27, 2019. It is now read-only.

component-create: prompt instead of error on invalid repo #352

Closed
aeosynth opened this issue Jun 10, 2013 · 6 comments
Closed

component-create: prompt instead of error on invalid repo #352

aeosynth opened this issue Jun 10, 2013 · 6 comments

Comments

@aeosynth
Copy link

would be nice if component-create immediately noticed invalid repos and responded with help text, instead of throwing an error at the end

$ component -V
0.16.3
$ component create
repo (username/project): foo
description: 
does this component have js? 
does this component have css? 
does this component have html? 

/usr/local/share/npm/lib/node_modules/component/bin/component-create:88
    if (2 != repo.length) throw new Error('repo must be <username>/<project>')
                                ^
Error: repo must be <username>/<project>
    at buf (/usr/local/share/npm/lib/node_modules/component/bin/component-create:88:33)
    at next (/usr/local/share/npm/lib/node_modules/component/node_modules/commander/lib/commander.js:828:24)
    at /usr/local/share/npm/lib/node_modules/component/node_modules/commander/lib/commander.js:831:9
    at ReadStream.<anonymous> (/usr/local/share/npm/lib/node_modules/component/node_modules/commander/lib/commander.js:764:5)
    at ReadStream.g (events.js:175:14)
    at ReadStream.EventEmitter.emit (events.js:95:17)
    at ReadStream.<anonymous> (_stream_readable.js:736:14)
    at ReadStream.EventEmitter.emit (events.js:92:17)
    at emitReadable_ (_stream_readable.js:408:10)
    at emitReadable (_stream_readable.js:404:5)
@vendethiel
Copy link

agreed, this bites me some times

@micky2be
Copy link
Contributor

It should be optional anyways. I mostly create local components, why should I enter a repo?

@ericgj
Copy link
Contributor

ericgj commented Jun 10, 2013

@micky2be component create --local doesn't ask for a repo

@tj
Copy link
Contributor

tj commented Jun 10, 2013

+1

@micky2be
Copy link
Contributor

@ericgj My bad, I didn't know that. Very useful information.
I always create the files manually anyways, I'm using a different style guide.

@jonathanong
Copy link
Contributor

componentjs/create.js#6

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

Successfully merging a pull request may close this issue.

7 participants