Skip to content

Commit

Permalink
Support absolute paths for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
atuchin-m committed Nov 2, 2024
1 parent 2554c12 commit c7953bd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/seed_tools/utils/studies_to_seed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import diffStrings from '../utils/diff_strings';
import * as file_utils from '../utils/file_utils';
import * as seed_validation from '../utils/seed_validation';
import * as study_json_utils from '../utils/study_json_utils';
import { wsPath } from 'src/base/path_utils';

export async function readStudiesToSeed(
studiesDir: string,
Expand Down Expand Up @@ -68,6 +69,8 @@ async function readStudiesAtRevision(
studyFileBaseNameMap: Map<Study, string>;
errors: string[];
}> {
const basePath = wsPath('//')
studiesDir = path.relative(basePath, studiesDir);
const files = execSync(`git show ${revision}:${studiesDir}`, {
encoding: 'utf8',
}).split('\n');
Expand Down

0 comments on commit c7953bd

Please sign in to comment.