diff --git a/packages/repofetch/src/cli.ts b/packages/repofetch/src/cli.ts index aa2b7fa..9f9e723 100644 --- a/packages/repofetch/src/cli.ts +++ b/packages/repofetch/src/cli.ts @@ -7,8 +7,7 @@ import { createClient } from './index.js'; import { setToken, deleteToken } from '@nesalia/repofetch-sdk'; import { homedir } from 'os'; import { join } from 'path'; -import { mkdirSync, readFileSync, writeFileSync, existsSync } from 'fs'; -import { chmod } from 'fs/promises'; +import { mkdirSync, readFileSync, writeFileSync, existsSync, chmodSync } from 'fs'; // Helper type guard functions for SDK errors @@ -24,7 +23,7 @@ function ensureConfigDir(): void { const dir = join(homedir(), '.config', 'repofetch'); if (!existsSync(dir)) { mkdirSync(dir, { recursive: true }); - chmod(dir, 0o700); // Owner-only access + chmodSync(dir, 0o700); // Owner-only access } } @@ -215,7 +214,7 @@ async function main() { const entries = Object.entries(node); entries.forEach(([name, value], index) => { const isEntryLast = index === entries.length - 1; - const connector = isEntryLast ? '└── ' : '│ '; + const connector = isEntryLast ? '└── ' : '├── '; const newPrefix = prefix + (isEntryLast ? " " : "| "); console.log(prefix + connector + name); if (value !== "file" && typeof value === "object" && value !== null) {