Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions bin/lib/credentials.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
const fs = require("fs");
const path = require("path");
const readline = require("readline");
const { execSync } = require("child_process");
const { execFileSync, execSync } = require("child_process");

const CREDS_DIR = path.join(process.env.HOME || "/tmp", ".nemoclaw");
const CREDS_FILE = path.join(CREDS_DIR, "credentials.json");
Expand Down Expand Up @@ -174,7 +174,10 @@ async function ensureApiKey() {

function isRepoPrivate(repo) {
try {
const json = execSync(`gh api repos/${repo} --jq .private 2>/dev/null`, { encoding: "utf-8" }).trim();
const json = execFileSync("gh", ["api", `repos/${repo}`, "--jq", ".private"], {
encoding: "utf-8",
stdio: ["ignore", "pipe", "ignore"],
}).trim();
return json === "true";
} catch {
return false;
Expand Down