Skip to content
This repository was archived by the owner on Apr 2, 2026. It is now read-only.

Commit 6ed203b

Browse files
greynewellclaude
andcommitted
fix: use exact regex match for auth status check in postinstall
out.includes("authenticated") matches "not authenticated", causing the postinstall to always take the already-authenticated branch even after logout. Use /^Status: authenticated$/m to match the exact output line. Co-Authored-By: Grey Newell <greyshipscode@gmail.com> Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent c4ae1dd commit 6ed203b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

npm/install.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ async function main() {
191191
let isAuthenticated = false;
192192
try {
193193
const out = execFileSync(destPath, ["auth", "status"], { stdio: "pipe" }).toString();
194-
isAuthenticated = out.includes("authenticated");
194+
isAuthenticated = /^Status: authenticated$/m.test(out);
195195
} catch (err) {
196196
// binary failed or not runnable — fall through to install
197197
}

0 commit comments

Comments
 (0)