Skip to content

Commit 338fcb5

Browse files
author
Théo LAGACHE
committed
chore(release): 26.02.5
1 parent 66ea8ca commit 338fcb5

3 files changed

Lines changed: 17 additions & 4 deletions

File tree

CITATION.cff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ keywords:
2222
- management
2323
- integration
2424
license: Apache-2.0
25-
version: 26.02.4
25+
version: 26.02.5
2626
date-released: "2026-02-10"

core/updater.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,15 +203,28 @@ def update_cli():
203203

204204
if need_sudo:
205205
console.print("[info]Permissions required to install to /usr/local/bin. Using sudo...[/info]")
206+
if current_exe.exists():
207+
subprocess.run(["sudo", "mv", str(current_exe), f"{current_exe}.old"], check=False)
206208
subprocess.run(["sudo", "mv", str(temp_file), str(current_exe)], check=True)
207209
subprocess.run(["sudo", "chmod", "+x", str(current_exe)], check=True)
208210
else:
211+
if current_exe.exists():
212+
old_exe = Path(f"{current_exe}.old")
213+
if old_exe.exists(): old_exe.unlink()
214+
current_exe.rename(old_exe)
209215
current_exe.parent.mkdir(parents=True, exist_ok=True)
210216
shutil.move(str(temp_file), str(current_exe))
211217

212-
console.print(f"[success]✔ Successfully updated to {latest_tag}![/success]")
218+
try:
219+
console.print(f"[success]✔ Successfully updated to {latest_tag}![/success]")
220+
except Exception:
221+
# Fallback to plain print if rich/PyInstaller fails to load modules after update
222+
print(f"Successfully updated to {latest_tag}!")
213223

214224
except Exception as e:
215-
console.print(f"[danger]✖ An error occurred during update: {e}[/danger]")
225+
try:
226+
console.print(f"[danger]✖ An error occurred during update: {e}[/danger]")
227+
except Exception:
228+
print(f"An error occurred during update: {e}")
216229
if 'temp_file' in locals() and temp_file.exists():
217230
temp_file.unlink()

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "portabase-cli"
3-
version = "26.02.4"
3+
version = "26.02.5"
44
description = "The official command line interface (CLI) for managing and deploying Portabase instances with ease."
55
readme = "README.md"
66
requires-python = ">=3.12"

0 commit comments

Comments
 (0)