Skip to content

Commit 9958741

Browse files
shigmaCyanChanges
authored andcommitted
chore: fix type check
1 parent 34d20d5 commit 9958741

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

packages/create/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "create-cordis",
33
"description": "Setup a Cordis application",
4-
"version": "0.2.4",
4+
"version": "0.2.5",
55
"type": "module",
66
"main": "src/index.ts",
77
"bin": "src/bin.ts",
@@ -35,7 +35,7 @@
3535
},
3636
"dependencies": {
3737
"env-paths": "^3.0.0",
38-
"get-registry": "^1.1.0",
38+
"get-registry": "^1.2.0",
3939
"js-yaml": "^4.1.0",
4040
"kleur": "^4.1.5",
4141
"prompts": "^2.4.2",

packages/create/src/index.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,13 @@ class Scaffold {
141141
}
142142

143143
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(/\/$/, '')
145151
console.log(kleur.dim(' Registry server: ') + this.registry)
146152

147153
console.log(

0 commit comments

Comments
 (0)