Skip to content

Commit b097214

Browse files
committed
show skip-git deprecation warning only when used
1 parent 4e70f64 commit b097214

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

.changeset/gorgeous-flies-teach.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@graphprotocol/graph-cli': patch
3+
---
4+
5+
show skip-git deprecation warning only when used

packages/cli/src/commands/init.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,6 @@ export default class InitCommand extends Command {
8181
'skip-git': Flags.boolean({
8282
summary: 'Skip initializing a Git repository.',
8383
default: false,
84-
deprecated: {
85-
message:
86-
'In next major version, this flag will be removed. By default we will stop initializing a Git repository.',
87-
},
8884
}),
8985
'start-block': Flags.string({
9086
helpGroup: 'Scaffold from contract',
@@ -142,6 +138,12 @@ export default class InitCommand extends Command {
142138

143139
initDebugger('Flags: %O', flags);
144140

141+
if (skipGit) {
142+
this.warn(
143+
'The --skip-git flag will be removed in the next major version. By default we will stop initializing a Git repository.',
144+
);
145+
}
146+
145147
const { node } = chooseNodeUrl({
146148
node: nodeFlag,
147149
});

0 commit comments

Comments
 (0)