Skip to content

Commit 9a341df

Browse files
committed
allow access by alias
1 parent 0c2358e commit 9a341df

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

abx_pkg/binprovider.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,8 @@ def __getattr__(self, item: str) -> Any:
196196
for field, meta in type(self).model_fields.items():
197197
if meta.alias == item:
198198
return getattr(self, field)
199+
if meta.validation_alias == item:
200+
return getattr(self, field)
199201
raise AttributeError(item)
200202

201203
def __repr__(self) -> str:

abx_pkg/binprovider_playwright.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ def setup(
233233
postinstall_scripts=effective_postinstall,
234234
min_release_age=effective_min_release_age,
235235
).install(no_cache=no_cache)
236-
self._INSTALLER_BIN_ABSPATH = cli.abspath
236+
self._INSTALLER_BIN_ABSPATH = cli.loaded_abspath
237237
self._INSTALLER_BINARY = cli
238238
path_entries: list[Path] = []
239239
if self.bin_dir is not None:

abx_pkg/binprovider_puppeteer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ def setup(
178178
min_release_age=min_release_age,
179179
no_cache=no_cache,
180180
)
181-
self._INSTALLER_BIN_ABSPATH = cli_binary.abspath
181+
self._INSTALLER_BIN_ABSPATH = cli_binary.loaded_abspath
182182
self._INSTALLER_BINARY = cli_binary
183183
path_entries: list[Path] = []
184184
if self.bin_dir is not None:
@@ -527,7 +527,7 @@ def default_install_handler(
527527

528528
if proc.returncode != 0 and self._should_repair_cli_install(install_output):
529529
cli_binary = self._cli_binary(postinstall_scripts=True, min_release_age=0)
530-
self._INSTALLER_BIN_ABSPATH = cli_binary.abspath
530+
self._INSTALLER_BIN_ABSPATH = cli_binary.loaded_abspath
531531
self._INSTALLER_BINARY = cli_binary
532532
proc = self.exec(
533533
bin_name=self._require_installer_bin(),

0 commit comments

Comments
 (0)