fix(release): clear final review blockers

This commit is contained in:
haelyra
2026-08-24 21:16:39 -04:00
parent 01779a4a2b
commit bbf5493279
11 changed files with 60 additions and 18 deletions
+30
View File
@@ -0,0 +1,30 @@
'use strict';
const os = require('os');
const path = require('path');
function configuredDirectory(environment, name) {
const value = environment && environment[name];
return typeof value === 'string' && value.trim() !== ''
? path.resolve(value.trim())
: null;
}
function resolveOpencodeConfigRoot(options = {}) {
const environment = options.env || process.env;
const explicitRoot = configuredDirectory(environment, 'OPENCODE_CONFIG_DIR');
if (explicitRoot) {
return explicitRoot;
}
const xdgConfigRoot = configuredDirectory(environment, 'XDG_CONFIG_HOME');
if (xdgConfigRoot) {
return path.join(xdgConfigRoot, 'opencode');
}
return path.join(path.resolve(options.homeDir || os.homedir()), '.config', 'opencode');
}
module.exports = {
resolveOpencodeConfigRoot,
};