Skip to content

Commit

Permalink
Fix regex to sanitize revision
Browse files Browse the repository at this point in the history
  • Loading branch information
atuchin-m committed Nov 19, 2024
1 parent 1d1ce89 commit 5c05de6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/seed_tools/utils/studies_to_seed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ async function readStudiesAtRevision(
studiesDir = path.relative(basePath, studiesDir);

// Validate revision format.
if (!/[a-z0-9]+/.test(revision) && revision !== 'HEAD') {
if (!/^[a-z0-9]+$/.test(revision) && revision !== 'HEAD') {
return {
studies: [],
studyFileBaseNameMap: new Map(),
Expand Down

0 comments on commit 5c05de6

Please sign in to comment.