mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-12-28 09:58:21 +01:00
Updated for options check
This commit is contained in:
parent
48613cf692
commit
7100e55661
1 changed files with 7 additions and 4 deletions
|
@ -27,9 +27,12 @@ class Tracking(Configs):
|
|||
self.grey: str = self.color['grey']
|
||||
self.yellow: str = self.color['yellow']
|
||||
self.endc: str = self.color['endc']
|
||||
self.flag_pkg_version: list = ['-p', '--pkg-version']
|
||||
|
||||
self.repo_for_binaries: bool = self.utils.is_option(['-B', '--bin-repo='], self.flags)
|
||||
self.flag_pkg_version: bool = self.utils.is_option(
|
||||
['-p', '--pkg-version'], self.flags)
|
||||
|
||||
self.repo_for_binaries: bool = self.utils.is_option(
|
||||
['-B', '--bin-repo='], self.flags)
|
||||
|
||||
def packages(self, packages: list, repo: str) -> None:
|
||||
""" Prints the packages dependencies. """
|
||||
|
@ -50,7 +53,7 @@ class Tracking(Configs):
|
|||
for package in packages:
|
||||
pkg = f'{self.yellow}{package}{self.endc}'
|
||||
|
||||
if self.utils.is_option(self.flag_pkg_version, self.flags):
|
||||
if self.flag_pkg_version:
|
||||
|
||||
if self.repo_for_binaries:
|
||||
version: str = bin_repo_dict[package][0]
|
||||
|
@ -75,7 +78,7 @@ class Tracking(Configs):
|
|||
for i, req in enumerate(requires, start=1):
|
||||
require: str = f'{self.cyan}{req}{self.endc}'
|
||||
|
||||
if self.utils.is_option(self.flag_pkg_version, self.flags):
|
||||
if self.flag_pkg_version:
|
||||
|
||||
if self.repo_for_binaries:
|
||||
version: str = f" {self.yellow}{bin_repo_dict[req][0]}{self.endc}"
|
||||
|
|
Loading…
Reference in a new issue