File tree 2 files changed +9
-3
lines changed
2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " create-cordis" ,
3
3
"description" : " Setup a Cordis application" ,
4
- "version" : " 0.2.4 " ,
4
+ "version" : " 0.2.5 " ,
5
5
"type" : " module" ,
6
6
"main" : " src/index.ts" ,
7
7
"bin" : " src/bin.ts" ,
35
35
},
36
36
"dependencies" : {
37
37
"env-paths" : " ^3.0.0" ,
38
- "get-registry" : " ^1.1 .0" ,
38
+ "get-registry" : " ^1.2 .0" ,
39
39
"js-yaml" : " ^4.1.0" ,
40
40
"kleur" : " ^4.1.5" ,
41
41
"prompts" : " ^2.4.2" ,
Original file line number Diff line number Diff line change @@ -141,7 +141,13 @@ class Scaffold {
141
141
}
142
142
143
143
async scaffold ( ) {
144
- this . registry = ( await getRegistry ( ) ) . replace ( / \/ $ / , '' )
144
+ const registry = await getRegistry ( )
145
+ if ( ! registry ) {
146
+ console . log ( kleur . red ( 'error' ) + ' unable to detect npm registry' )
147
+ process . exit ( 1 )
148
+ }
149
+
150
+ this . registry = registry . replace ( / \/ $ / , '' )
145
151
console . log ( kleur . dim ( ' Registry server: ' ) + this . registry )
146
152
147
153
console . log (
You can’t perform that action at this time.
0 commit comments