Skip to content

Commit

Permalink
properly handle version and name flags
Browse files Browse the repository at this point in the history
  • Loading branch information
YaroShkvorets committed Dec 17, 2024
1 parent b643068 commit e93fa1d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/cli/src/commands/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ export default class DeployCommand extends Command {
type: 'input',
name: 'subgraphName',
message: () => 'What is the subgraph name?',
skip: () => !!subgraphNameArg,
initial: subgraphNameArg,
required: true,
},
Expand Down Expand Up @@ -158,6 +159,7 @@ export default class DeployCommand extends Command {
name: 'versionLabel',
message: () => 'Which version label to use? (e.g. "v0.0.1")',
initial: versionLabelFlag,
skip: () => !!versionLabelFlag,
required: true,
},
]);
Expand Down Expand Up @@ -191,10 +193,10 @@ export default class DeployCommand extends Command {
errorMessage += '\nYou may need to authenticate first.';
}
spinner.fail(errorMessage);
this.exit(1);
process.exit(1);
} else if (requestError) {
spinner.fail(`HTTP error deploying the subgraph ${requestError.code}`);
this.exit(1);
process.exit(1);
} else {
spinner.stop();

Expand Down

0 comments on commit e93fa1d

Please sign in to comment.