Skip to content

Commit 5349d1f

Browse files
committed
remove unneeded catch
1 parent dec8e07 commit 5349d1f

File tree

1 file changed

+17
-21
lines changed

1 file changed

+17
-21
lines changed

packages/cli/src/commands/init.ts

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -253,12 +253,10 @@ export default class InitCommand extends Command {
253253
}
254254

255255
if (fromExample) {
256-
const answers = await processFromExampleInitForm
257-
.bind(this)({
258-
subgraphName,
259-
directory,
260-
})
261-
.catch(() => this.exit(1));
256+
const answers = await processFromExampleInitForm.bind(this)({
257+
subgraphName,
258+
directory,
259+
});
262260

263261
if (!answers) {
264262
this.exit(1);
@@ -276,21 +274,19 @@ export default class InitCommand extends Command {
276274
);
277275
} else {
278276
// Otherwise, take the user through the interactive form
279-
const answers = await processInitForm
280-
.bind(this)({
281-
abi,
282-
abiPath,
283-
directory,
284-
source: fromContract,
285-
indexEvents,
286-
fromExample,
287-
subgraphName,
288-
contractName,
289-
startBlock,
290-
spkgPath,
291-
ipfsUrl: ipfs,
292-
})
293-
.catch(() => this.exit(1));
277+
const answers = await processInitForm.bind(this)({
278+
abi,
279+
abiPath,
280+
directory,
281+
source: fromContract,
282+
indexEvents,
283+
fromExample,
284+
subgraphName,
285+
contractName,
286+
startBlock,
287+
spkgPath,
288+
ipfsUrl: ipfs,
289+
});
294290
if (!answers) {
295291
this.exit(1);
296292
}

0 commit comments

Comments
 (0)