@octavio.bot/review 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +17 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -15798,6 +15798,21 @@ var defaultResultPath = (pullNumber) => {
|
|
|
15798
15798
|
};
|
|
15799
15799
|
var truncateForLogs = (value) => value.length > REPORT_LOG_MAX_CHARS ? `${value.slice(0, REPORT_LOG_MAX_CHARS)}
|
|
15800
15800
|
...truncated...` : value;
|
|
15801
|
+
var ensureBinaryDirectoryOnPath = (binaryPath) => {
|
|
15802
|
+
const directoryEnd = binaryPath.lastIndexOf("/");
|
|
15803
|
+
if (directoryEnd <= 0) {
|
|
15804
|
+
return;
|
|
15805
|
+
}
|
|
15806
|
+
const directory = binaryPath.slice(0, directoryEnd);
|
|
15807
|
+
const currentPath = process.env.PATH ?? "";
|
|
15808
|
+
const pathEntries = currentPath.split(":").filter((entry) => entry.length > 0);
|
|
15809
|
+
if (pathEntries.includes(directory)) {
|
|
15810
|
+
return;
|
|
15811
|
+
}
|
|
15812
|
+
process.env.PATH = currentPath.length > 0 ? `${directory}:${currentPath}` : directory;
|
|
15813
|
+
process.stdout.write(`Added ${directory} to PATH for this process.
|
|
15814
|
+
`);
|
|
15815
|
+
};
|
|
15801
15816
|
var knownOpenCodePaths = () => {
|
|
15802
15817
|
const home = process.env.HOME;
|
|
15803
15818
|
return [
|
|
@@ -15859,6 +15874,7 @@ var runOpenCodeInstall = async () => {
|
|
|
15859
15874
|
var ensureOpenCodeInstalled = async (forceInstall) => {
|
|
15860
15875
|
const detectedBeforeInstall = await detectOpenCode();
|
|
15861
15876
|
if (detectedBeforeInstall) {
|
|
15877
|
+
ensureBinaryDirectoryOnPath(detectedBeforeInstall.path);
|
|
15862
15878
|
process.stdout.write(`OpenCode detected at ${detectedBeforeInstall.path} (${detectedBeforeInstall.version}).
|
|
15863
15879
|
`);
|
|
15864
15880
|
return detectedBeforeInstall;
|
|
@@ -15883,6 +15899,7 @@ var ensureOpenCodeInstalled = async (forceInstall) => {
|
|
|
15883
15899
|
}
|
|
15884
15900
|
process.stdout.write(`OpenCode installed at ${detectedAfterInstall.path} (${detectedAfterInstall.version}).
|
|
15885
15901
|
`);
|
|
15902
|
+
ensureBinaryDirectoryOnPath(detectedAfterInstall.path);
|
|
15886
15903
|
return detectedAfterInstall;
|
|
15887
15904
|
};
|
|
15888
15905
|
var runDoctor = async () => {
|
package/package.json
CHANGED