mirror of
https://github.com/kwhittle/obsidian-github-tools.git
synced 2026-07-22 07:44:31 +00:00
Fix off-by-one in file path parsing for first uncommitted file
stdout.trim() was stripping the leading space from the first line of git status --porcelain output, causing substring(3) to index one char into the filename. Switch to trimEnd() to only strip trailing newlines. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
da938de175
commit
fd2818ad56
3 changed files with 3 additions and 3 deletions
2
main.ts
2
main.ts
|
|
@ -121,7 +121,7 @@ function errorMessage(e: unknown): string {
|
|||
|
||||
async function gitExec(repoPath: string, args: string): Promise<string> {
|
||||
const { stdout } = await execAsync(`git -C "${repoPath}" ${args}`);
|
||||
return stdout.trim();
|
||||
return stdout.trimEnd();
|
||||
}
|
||||
|
||||
function parseChangedFiles(porcelain: string): ChangedFile[] {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "github-repo-tools",
|
||||
"name": "GitHub Repo Tools",
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.2",
|
||||
"minAppVersion": "1.7.2",
|
||||
"description": "Monitor a GitHub repo — staleness alerts, PR dashboard, and activity notifications.",
|
||||
"author": "Kyle Whittle",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "obsidian-github-tools",
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.2",
|
||||
"description": "GitHub wiki repo monitor for Obsidian",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
|
|
|||
Loading…
Reference in a new issue