Skip to content

Commit

Permalink
.aiderignore ファイルの更新処理を修正 🐛
Browse files Browse the repository at this point in the history
  • Loading branch information
nekowasabi committed Oct 12, 2024
1 parent 5f4de96 commit 1bba75a
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions denops/aider/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,14 +208,10 @@ export async function main(denops: Denops): Promise<void> {
const filePathToOpen = `${gitRoot}/.aiderignore`;
const relativePath = currentFile.replace(gitRoot, "");

try {
const fileContent = await fn.readfile(denops, filePathToOpen);
fileContent.push(`!${relativePath}`);
await fn.writefile(denops, fileContent, filePathToOpen);
console.log(`Added ${currentFile} to .aiderignore`);
} catch (error) {
console.error(`Failed to update .aiderignore: ${error.message}`);
}
const fileContent = await fn.readfile(denops, filePathToOpen);
fileContent.push(`!${relativePath}`);
await fn.writefile(denops, fileContent, filePathToOpen);
console.log(`Added ${currentFile} to .aiderignore`);
}),

await command("voice", "0", async () => {
Expand Down

0 comments on commit 1bba75a

Please sign in to comment.