mirror of
https://github.com/caelestia-dots/cli.git
synced 2026-06-12 11:59:59 -05:00
version: silence stderr
This commit is contained in:
@@ -6,7 +6,9 @@ from caelestia.utils.paths import config_dir
|
|||||||
def print_version() -> None:
|
def print_version() -> None:
|
||||||
print("Packages:")
|
print("Packages:")
|
||||||
pkgs = ["caelestia-shell-git", "caelestia-cli-git", "caelestia-meta"]
|
pkgs = ["caelestia-shell-git", "caelestia-cli-git", "caelestia-meta"]
|
||||||
versions = subprocess.run(["pacman", "-Q", *pkgs], stdout=subprocess.PIPE, text=True).stdout
|
versions = subprocess.run(
|
||||||
|
["pacman", "-Q", *pkgs], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, text=True
|
||||||
|
).stdout
|
||||||
|
|
||||||
for pkg in pkgs:
|
for pkg in pkgs:
|
||||||
if pkg not in versions:
|
if pkg not in versions:
|
||||||
@@ -40,6 +42,7 @@ def print_version() -> None:
|
|||||||
"upstream/main",
|
"upstream/main",
|
||||||
],
|
],
|
||||||
text=True,
|
text=True,
|
||||||
|
stderr=subprocess.DEVNULL,
|
||||||
)
|
)
|
||||||
print(" Last merged upstream commit:", shell_ver.split()[1])
|
print(" Last merged upstream commit:", shell_ver.split()[1])
|
||||||
print(" Commit message:", *shell_ver.splitlines()[1:])
|
print(" Commit message:", *shell_ver.splitlines()[1:])
|
||||||
|
|||||||
Reference in New Issue
Block a user