From 09a41e56ea58b699b2ed577516772c7ef19233f8 Mon Sep 17 00:00:00 2001 From: Nell Hardcastle Date: Thu, 18 Jul 2024 14:26:32 -0700 Subject: [PATCH] fix(cli): Fix wrong argument length bug for new uploader with existing dataset. --- cli/src/commands/upload.ts | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/cli/src/commands/upload.ts b/cli/src/commands/upload.ts index 0f89307a9..861e7bc2d 100644 --- a/cli/src/commands/upload.ts +++ b/cli/src/commands/upload.ts @@ -5,14 +5,7 @@ import { validateCommand, } from "../bids_validator.ts" import { logger } from "../logger.ts" -import { - Confirm, - join, - prompt, - relative, - resolve, - walk, -} from "../deps.ts" +import { Confirm, join, prompt, relative, resolve, walk } from "../deps.ts" import type { CommandOptions } from "../deps.ts" import { getRepoAccess } from "./git-credential.ts" import { readConfig } from "../config.ts" @@ -47,7 +40,10 @@ export async function addGitFiles( }) ) { const relativePath = relative(dataset_directory_abs, walkEntry.path) - if (relativePath === ".bidsignore" || relativePath === ".gitattributes" || !relativePath.startsWith(".")) { + if ( + relativePath === ".bidsignore" || relativePath === ".gitattributes" || + !relativePath.startsWith(".") + ) { worker.postMessage({ "command": "add", "path": walkEntry.path, @@ -183,9 +179,13 @@ export const upload = validateCommand hidden: true, override: true, }) - .option("-d, --dataset", "Specify an existing dataset to update.", { - conflicts: ["create"], - }) + .option( + "-d, --dataset [dataset:string]", + "Specify an existing dataset to update.", + { + conflicts: ["create"], + }, + ) .option("-c, --create", "Skip confirmation to create a new dataset.", { conflicts: ["dataset"], })