Skip to content

Commit d3370d7

Browse files
authored
fix(branch): commit clears username (#128)
Fixed issue where committing with better-commits cleared username cache for better-branch.
1 parent de75ea4 commit d3370d7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,11 @@ export async function main(config: Output<typeof Config>) {
358358
p.log.error("Something went wrong when committing: " + err);
359359
}
360360
p.log.success("Commit Complete");
361+
362+
// Instead of deleting individual keys, just get what we need and clear.
363+
const user_name = prompt_cache.get("username");
361364
prompt_cache.clear();
365+
if (user_name) prompt_cache.set("username", user_name);
362366
}
363367

364368
function build_commit_string(

0 commit comments

Comments
 (0)