mirror of
https://github.com/harivansh-afk/veet-code.git
synced 2026-04-17 15:04:56 +00:00
dont overwrite solutions
This commit is contained in:
parent
205957c167
commit
a3754bb019
1 changed files with 4 additions and 2 deletions
|
|
@ -509,12 +509,14 @@ class VeetcodeApp(App):
|
||||||
|
|
||||||
@work(thread=True)
|
@work(thread=True)
|
||||||
def auto_update(self) -> None:
|
def auto_update(self) -> None:
|
||||||
"""Silently update veetcode in background."""
|
"""Silently update veetcode in background, preserving user solutions."""
|
||||||
import subprocess
|
import subprocess
|
||||||
repo = Path(__file__).parent.parent
|
repo = Path(__file__).parent.parent
|
||||||
try:
|
try:
|
||||||
|
# Use --autostash to preserve local changes (user solutions)
|
||||||
|
# and --rebase to cleanly apply updates
|
||||||
subprocess.run(
|
subprocess.run(
|
||||||
["git", "pull", "--quiet"],
|
["git", "pull", "--rebase", "--autostash", "--quiet"],
|
||||||
cwd=repo,
|
cwd=repo,
|
||||||
capture_output=True,
|
capture_output=True,
|
||||||
timeout=10,
|
timeout=10,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue