From 52724ecc5b86d39489c0b2340dc40ad000591bfc Mon Sep 17 00:00:00 2001 From: Javanaut Date: Thu, 9 Apr 2026 01:03:41 +0200 Subject: [PATCH] ff --- src/ffx/ffx.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/ffx/ffx.py b/src/ffx/ffx.py index 02e7764..fe6b56f 100755 --- a/src/ffx/ffx.py +++ b/src/ffx/ffx.py @@ -150,7 +150,7 @@ def setup_dependencies(ctx, check, prepare_args): @ffx.command(name='upgrade') @click.pass_context -@click.argument('branch', required=False, default='main') +@click.option('--branch', type=str, default='', help='Checkout this branch before pulling') def upgrade(ctx, branch): bundleRepoPath = getBundleRepoPath() bundlePipPath = getBundlePipPath() @@ -161,8 +161,12 @@ def upgrade(ctx, branch): if not os.path.isfile(bundlePipPath): raise click.ClickException(f"Bundle pip not found at {bundlePipPath}") - commandSequences = [ - ['git', 'checkout', branch], + commandSequences = [] + + if branch: + commandSequences.append(['git', 'checkout', branch]) + + commandSequences += [ ['git', 'pull'], [bundlePipPath, 'install', '--editable', '.'], ]