fix: allow missing git in yomitan build; clean up README formatting

- Guard `getSourceState()` with `SUBMINER_YOMITAN_ALLOW_MISSING_GIT=1` escape hatch for environments without a git submodule
- Fix README requirements table column alignment and remove stray horizontal rule
- Update task-268 with follow-up CodeRabbit round notes and final summary
This commit is contained in:
2026-03-31 23:47:07 -07:00
parent 6aadde4577
commit 09b11b689f
3 changed files with 26 additions and 11 deletions

View File

@@ -51,9 +51,16 @@ function ensureSubmodulePresent() {
}
function getSourceState() {
const revision = readCommand('git', ['rev-parse', 'HEAD'], submoduleDir);
const dirty = readCommand('git', ['status', '--short', '--untracked-files=no'], submoduleDir);
return { revision, dirty };
try {
const revision = readCommand('git', ['rev-parse', 'HEAD'], submoduleDir);
const dirty = readCommand('git', ['status', '--short', '--untracked-files=no'], submoduleDir);
return { revision, dirty };
} catch (error) {
if (process.env.SUBMINER_YOMITAN_ALLOW_MISSING_GIT === '1') {
return { revision: 'unknown', dirty: '' };
}
throw error;
}
}
function isBuildCurrent(force) {