Skip to content

Commit f47fc1d

Browse files
committed
Add back the --git-sync option for backward compatibility.
I had to rename the --no-git-sync option into --git-sync because somehow --no-git-sync and --git-sync options conflict (bug with clipanion?). Given the very low usage of these params I just went with the rename rather than trying to fix the bug.
1 parent f2549cb commit f47fc1d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/commands/git-metadata/upload.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export class UploadCommand extends Command {
4242
}
4343
private dryRun = false
4444
private verbose = false
45+
private gitSync = false
4546
private noGitSync = false
4647
private directory = ''
4748
private logger: Logger = new Logger((s: string) => {
@@ -79,6 +80,10 @@ export class UploadCommand extends Command {
7980
return 1
8081
}
8182

83+
if (this.gitSync) {
84+
this.logger.warn('option --git-sync is deprecated as it is now the default behavior')
85+
}
86+
8287
const metricsLogger = getMetricsLogger({
8388
datadogSite: process.env.DATADOG_SITE,
8489
defaultTags: [`cli_version:${this.cliVersion}`],
@@ -212,6 +217,7 @@ export class UploadCommand extends Command {
212217
UploadCommand.addPath('git-metadata', 'upload')
213218
UploadCommand.addOption('dryRun', Command.Boolean('--dry-run'))
214219
UploadCommand.addOption('verbose', Command.Boolean('--verbose'))
220+
UploadCommand.addOption('gitSync', Command.Boolean('--git-sync'))
221+
UploadCommand.addOption('noGitSync', Command.Boolean('--no-gitsync'))
215222
UploadCommand.addOption('directory', Command.String('--directory'))
216-
UploadCommand.addOption('noGitSync', Command.Boolean('--no-git-sync'))
217223
UploadCommand.addOption('repositoryURL', Command.String('--repository-url'))

0 commit comments

Comments
 (0)