Skip to content

Commit

Permalink
run make format also
Browse files Browse the repository at this point in the history
  • Loading branch information
marclefrancois committed Mar 1, 2024
1 parent 1be57dc commit a36ddec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cli/src/services/formatters/hook-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const capitalizeFirstLetter = (str: string) =>

export default class HookRunnerFomatter {
log(name: string, commands: string[]) {
const operation = capitalizeFirstLetter(decamelize(name, { separator: ' ' }));
const operation = capitalizeFirstLetter(decamelize(name, {separator: ' '}));
console.log(chalk.yellow('➤ '), chalk.bold(chalk.yellow(`${operation}:`)));
commands.forEach((command) => {
console.log(' ', chalk.yellow(command));
Expand Down
10 changes: 5 additions & 5 deletions cli/src/services/hook-runner.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Vendor
import { execSync } from 'child_process';
import {execSync} from 'child_process';

// Formatters
import Formatter from './formatters/hook-runner';

// Types
import { HookConfig, Hooks } from '../types/document-config';
import {HookConfig, Hooks} from '../types/document-config';
import Document from './document';

export default class HookRunner {
Expand All @@ -23,13 +23,13 @@ export default class HookRunner {
const hooks = this.hooks[name];

if (hooks) {
const formatter = new Formatter()
const formatter = new Formatter();
formatter.log(name, hooks);

hooks.forEach((hook) => {
try {
const output: string = execSync(hook, { stdio: 'pipe' }).toString();
formatter.log(hook, [output])
const output: string = execSync(hook, {stdio: 'pipe'}).toString();
formatter.log(hook, [output]);
} catch (error: any) {
formatter.error(hook, [error.stderr.toString()]);
process.exit(error.status);
Expand Down

0 comments on commit a36ddec

Please sign in to comment.