Skip to content

Commit

Permalink
remove unneeded catch
Browse files Browse the repository at this point in the history
  • Loading branch information
YaroShkvorets committed Dec 31, 2024
1 parent dec8e07 commit 5349d1f
Showing 1 changed file with 17 additions and 21 deletions.
38 changes: 17 additions & 21 deletions packages/cli/src/commands/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,12 +253,10 @@ export default class InitCommand extends Command {
}

if (fromExample) {
const answers = await processFromExampleInitForm
.bind(this)({
subgraphName,
directory,
})
.catch(() => this.exit(1));
const answers = await processFromExampleInitForm.bind(this)({
subgraphName,
directory,
});

if (!answers) {
this.exit(1);
Expand All @@ -276,21 +274,19 @@ export default class InitCommand extends Command {
);
} else {
// Otherwise, take the user through the interactive form
const answers = await processInitForm
.bind(this)({
abi,
abiPath,
directory,
source: fromContract,
indexEvents,
fromExample,
subgraphName,
contractName,
startBlock,
spkgPath,
ipfsUrl: ipfs,
})
.catch(() => this.exit(1));
const answers = await processInitForm.bind(this)({
abi,
abiPath,
directory,
source: fromContract,
indexEvents,
fromExample,
subgraphName,
contractName,
startBlock,
spkgPath,
ipfsUrl: ipfs,
});
if (!answers) {
this.exit(1);
}
Expand Down

0 comments on commit 5349d1f

Please sign in to comment.