Skip to content

Commit

Permalink
fix(cli): Skip dotfiles in uploads (except .bidsignore and .gitattrib…
Browse files Browse the repository at this point in the history
…utes)
  • Loading branch information
nellh committed Mar 19, 2024
1 parent 388024a commit d46f1bc
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions cli/src/commands/upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { logger } from "../logger.ts"
import {
Confirm,
join,
ProgressBar,
prompt,
relative,
resolve,
Expand Down Expand Up @@ -48,11 +47,15 @@ export async function addGitFiles(
})
) {
const relativePath = relative(dataset_directory_abs, walkEntry.path)
worker.postMessage({
"command": "add",
"path": walkEntry.path,
"relativePath": relativePath,
})
if (relativePath === ".bidsignore" || relativePath === ".gitattributes" || !relativePath.startsWith(".")) {
worker.postMessage({
"command": "add",
"path": walkEntry.path,
"relativePath": relativePath,
})
} else {
logger.warn(`Skipped file "${relativePath}"`)
}
}
}

Expand Down

0 comments on commit d46f1bc

Please sign in to comment.