[READ-ONLY] a fast, modern browser for the npm registry

fix: do not run lunaria when making a merge commit (#1440)

authored by

Alex Savelyev and committed by
GitHub
323bb306 0475e6fa

+8 -1
+8 -1
lunaria/lunaria.ts
··· 1 1 import { createLunaria } from '@lunariajs/core' 2 - import { mkdirSync, readFileSync, writeFileSync } from 'node:fs' 2 + import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs' 3 3 import { Page } from './components.ts' 4 4 import { lunariaJSONFiles, prepareJsonFiles } from './prepare-json-files.ts' 5 5 import type { I18nStatus } from '../shared/types/i18n-status.ts' 6 + 7 + // skip lunaria during git merges as git history may be in an inconsistent state. 8 + if (existsSync('.git/MERGE_HEAD')) { 9 + // eslint-disable-next-line no-console 10 + console.log('Skipping lunaria: git merge in progress') 11 + process.exit(0) 12 + } 6 13 7 14 await prepareJsonFiles() 8 15