Skip to content

Commit

Permalink
fix(cli): Fix wrong argument length bug for new uploader with existin…
Browse files Browse the repository at this point in the history
…g dataset.
  • Loading branch information
nellh committed Jul 18, 2024
1 parent d409012 commit 09a41e5
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions cli/src/commands/upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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"],
})
Expand Down

0 comments on commit 09a41e5

Please sign in to comment.