diff --git a/.changeset/beige-boxes-punch.md b/.changeset/beige-boxes-punch.md new file mode 100644 index 000000000..85d7d1dfc --- /dev/null +++ b/.changeset/beige-boxes-punch.md @@ -0,0 +1,5 @@ +--- +'@graphprotocol/graph-cli': patch +--- + +fix flag startup bug diff --git a/packages/cli/src/commands/init.ts b/packages/cli/src/commands/init.ts index 4c35dfd8c..d9b9e020b 100644 --- a/packages/cli/src/commands/init.ts +++ b/packages/cli/src/commands/init.ts @@ -143,7 +143,7 @@ export default class InitCommand extends Command { 'The --skip-git flag will be removed in the next major version. By default we will stop initializing a Git repository.', ); } - if ((!fromContract || !spkgPath) && !network && !fromExample) { + if ((fromContract || spkgPath) && !network && !fromExample) { this.error('--network is required when using --from-contract or --spkg'); }