Logo
Explore Help
Sign In
kevinveenbirkenbach/pkgmgr
1
0
Fork 0
You've already forked pkgmgr
Code Issues Pull Requests Actions 27 Packages Projects Releases Wiki Activity
Files
7f262c655730fe6d7ce022dd68e91539ee469329
pkgmgr/tests/e2e/_util.py

25 lines
558 B
Python
Raw Normal View History

feat(install): add `--update` to re-run active-layer installers and improve Nix refresh logic * Add `force_update` to `RepoContext` and propagate it through install/update flows * Add `pkgmgr install --update` to force re-running installers even if the same CLI layer is already loaded * Enhance `NixFlakeInstaller` to ensure correct outputs (pkgmgr + optional default for package-manager) and support refresh/upgrade with index-based fallback remove+reinstall * Make Python/Makefile installers emit an “upgraded” marker when `force_update` is used * Add E2E tests for “three times install” scenarios (makefile, nix, venv) with shared run helper * Fix git safe.directory wildcard quoting in E2E shell runner and minor cleanup/reordering of imports/comments https://chatgpt.com/share/693db0b4-6ea4-800f-b44a-f03939c7fb9e
2025-12-13 19:30:06 +01:00
import subprocess
def run(cmd, *, cwd=None, env=None, shell=False) -> str:
proc = subprocess.run(
cmd,
cwd=cwd,
env=env,
shell=shell,
text=True,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
)
print("----- BEGIN COMMAND -----")
print(cmd if isinstance(cmd, str) else " ".join(cmd))
print("----- OUTPUT -----")
print(proc.stdout.rstrip())
print("----- END COMMAND -----")
if proc.returncode != 0:
raise AssertionError(proc.stdout)
return proc.stdout
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.2 Page: 409ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API