Skip to content

armgit / avibe

Public Imported from GitHub
0

Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.

fix(npm): require executable vibe candidates

cyh8ca975535b60
diff --git a/npm/avibe/bin/avibe.js b/npm/avibe/bin/avibe.js
index 7d7dc6f2a..867f713bc 100755
--- a/npm/avibe/bin/avibe.js
+++ b/npm/avibe/bin/avibe.js
@@ -83,7 +83,14 @@ function executableNames(name) {
function isExecutable(filePath) {
try {
const stat = fs.statSync(filePath);
- return stat.isFile();
+ if (!stat.isFile()) {
+ return false;
+ }
+ if (process.platform === "win32") {
+ return true;
+ }
+ fs.accessSync(filePath, fs.constants.X_OK);
+ return true;
} catch {
return false;
}
diff --git a/npm/avibe/test/cli.test.js b/npm/avibe/test/cli.test.js
index 789bdd78d..139437905 100644
--- a/npm/avibe/test/cli.test.js
+++ b/npm/avibe/test/cli.test.js
@@ -96,6 +96,25 @@ test("delegates commands to an existing vibe binary", () => {
assert.match(result.stdout, /existing-vibe status --json/);
});
+test("ignores non-executable vibe files on PATH", { skip: process.platform === "win32" }, () => {
+ const temp = makeTempEnv();
+ const staleBin = path.join(temp.root, "stale-bin");
+ const workingBin = path.join(temp.root, "working-bin");
+ fs.mkdirSync(staleBin, { recursive: true });
+ fs.mkdirSync(workingBin, { recursive: true });
+ fs.writeFileSync(path.join(staleBin, "vibe"), "not executable\n", { mode: 0o644 });
+ writeFakeVibe(workingBin, "working-vibe");
+
+ const result = runCli(["status"], {
+ HOME: temp.home,
+ USERPROFILE: temp.home,
+ PATH: `${staleBin}${path.delimiter}${workingBin}`,
+ });
+
+ assert.equal(result.status, 0);
+ assert.match(result.stdout, /working-vibe status/);
+});
+
test("installs vibe when missing, then delegates", () => {
const temp = makeTempEnv();
const installCommand =