mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-04-01 06:12:07 -07:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user