diff --git a/src/seed_tools/commands/split_seed_json.ts b/src/seed_tools/commands/split_seed_json.ts index 37586bff..bf506ec3 100644 --- a/src/seed_tools/commands/split_seed_json.ts +++ b/src/seed_tools/commands/split_seed_json.ts @@ -5,8 +5,8 @@ import { Command } from '@commander-js/extra-typings'; import { promises as fs } from 'fs'; -import * as study_json_utils from '../utils/study_json_utils'; import { parseLegacySeedJson } from '../utils/legacy_json_to_seed'; +import * as study_json_utils from '../utils/study_json_utils'; export default function createCommand() { return new Command('split_seed_json') diff --git a/src/seed_tools/utils/exec.ts b/src/seed_tools/utils/exec.ts index e15d60ec..5755be69 100644 --- a/src/seed_tools/utils/exec.ts +++ b/src/seed_tools/utils/exec.ts @@ -9,7 +9,9 @@ export function exec(commands: string[]): string { if (commands.length === 0) { throw new Error('No command provided'); } - const result = spawnSync(commands[0], commands.slice(1), { encoding: 'utf8' }); + const result = spawnSync(commands[0], commands.slice(1), { + encoding: 'utf8', + }); if (result.status !== 0) { throw new Error(`Command failed: ${commands.join(' ')}\n${result.stderr}`); } diff --git a/src/seed_tools/utils/studies_to_seed.ts b/src/seed_tools/utils/studies_to_seed.ts index 741bf0eb..564094d7 100644 --- a/src/seed_tools/utils/studies_to_seed.ts +++ b/src/seed_tools/utils/studies_to_seed.ts @@ -3,7 +3,6 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this file, // You can obtain one at https://mozilla.org/MPL/2.0/. -import { exec } from './exec'; import { promises as fs } from 'fs'; import * as path from 'path'; import { wsPath } from 'src/base/path_utils'; @@ -17,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 { exec } from './exec'; import { parseLegacySeedJson } from './legacy_json_to_seed'; export async function readStudiesToSeed( @@ -73,7 +73,9 @@ async function readStudiesAtRevision( const basePath = wsPath('//'); studiesDir = path.relative(basePath, studiesDir); try { - const files = exec(['git', 'show', `${revision}:${studiesDir}`]).split('\n'); + const files = exec(['git', 'show', `${revision}:${studiesDir}`]).split( + '\n', + ); const filesWithContent = []; for (const file of files) {