Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
atuchin-m committed Nov 18, 2024
1 parent a5677b7 commit 1cf9d12
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/seed_tools/commands/split_seed_json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
4 changes: 3 additions & 1 deletion src/seed_tools/utils/exec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
}
Expand Down
6 changes: 4 additions & 2 deletions src/seed_tools/utils/studies_to_seed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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(
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 1cf9d12

Please sign in to comment.