feat(cli): allow skipping branch validation (#6721)

This commit is contained in:
Alexander Petric
2025-10-01 15:04:06 +00:00
committed by GitHub
parent 2b95f82839
commit 52bf2eb9c1
3 changed files with 9 additions and 7 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ export async function pushGitSyncSettings(
) {
// Validate branch configuration like sync commands
try {
await validateBranchConfiguration();
await validateBranchConfiguration({ yes: opts.yes });
} catch (error) {
if (error instanceof Error && error.message.includes("overrides")) {
log.error(error.message);
+4 -2
View File
@@ -1265,7 +1265,7 @@ export async function pull(
// Validate branch configuration early
try {
await validateBranchConfiguration(false, opts.yes);
await validateBranchConfiguration(opts);
} catch (error) {
if (error instanceof Error && error.message.includes("overrides")) {
log.error(error.message);
@@ -1690,7 +1690,7 @@ export async function push(
// Validate branch configuration early
try {
await validateBranchConfiguration(false, opts.yes);
await validateBranchConfiguration(opts);
} catch (error) {
if (error instanceof Error && error.message.includes("overrides")) {
log.error(error.message);
@@ -2358,6 +2358,7 @@ const command = new Command()
.option("--include-groups", "Include syncing groups")
.option("--include-settings", "Include syncing workspace settings")
.option("--include-key", "Include workspace encryption key")
.option("--skip-branch-validation", "Skip git branch validation and prompts")
.option("--json-output", "Output results in JSON format")
.option(
"-i --includes <patterns:file[]>",
@@ -2405,6 +2406,7 @@ const command = new Command()
.option("--include-groups", "Include syncing groups")
.option("--include-settings", "Include syncing workspace settings")
.option("--include-key", "Include workspace encryption key")
.option("--skip-branch-validation", "Skip git branch validation and prompts")
.option("--json-output", "Output results in JSON format")
.option(
"-i --includes <patterns:file[]>",