fixed paru install logic for list argument
This commit is contained in:
parent
04e07fe91c
commit
e927e181d9
1 changed files with 5 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
||||||
from .constants import content_dir
|
from .constants import content_dir
|
||||||
|
from .log import error
|
||||||
|
|
||||||
from importlib.machinery import SourceFileLoader
|
from importlib.machinery import SourceFileLoader
|
||||||
from os import system, makedirs
|
from os import system, makedirs
|
||||||
|
@ -17,9 +18,11 @@ def paru_install(packages: str | list[str]) -> None:
|
||||||
|
|
||||||
if type(packages) == str:
|
if type(packages) == str:
|
||||||
system(f"paru -S --noconfirm {packages}")
|
system(f"paru -S --noconfirm {packages}")
|
||||||
elif type(packages) == list[str]:
|
elif type(packages) == list:
|
||||||
packages = packages.join(" ")
|
packages = " ".join(packages)
|
||||||
system(f"paru -S --noconfirm {packages}")
|
system(f"paru -S --noconfirm {packages}")
|
||||||
|
else:
|
||||||
|
error("Invalid paru packages format.")
|
||||||
|
|
||||||
|
|
||||||
def flatpak_install(packages: str) -> None:
|
def flatpak_install(packages: str) -> None:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue