Skip to content

Commit

Permalink
fix: delay nrfutil-toolchain-manager check
Browse files Browse the repository at this point in the history
Perform check for the nrfutil-toolchain-manager after determining
that the east was run inside the NCS project. Otherwise east
complains about the missing nrfutil-toolchain-manager when it
actually isn't needed.
  • Loading branch information
MarkoSagadin committed Jul 3, 2024
1 parent d7510cc commit 6dade7d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

## [Unreleased]

### Fixed

- Perform check for nrfutil-toolchain-manager after determining that the east
was run inside the NCS project.

## [0.18.2] - 2024-04-04

### Fixed
Expand Down
15 changes: 8 additions & 7 deletions src/east/east_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,22 +452,23 @@ def pre_workspace_command_check(
self.print(format_east_yml_load_error_msg(msg), highlight=False)
self.exit()

# Exit if manager is not installed
if not self.check_exe(self.consts["nrf_toolchain_manager_path"]):
self.print(no_toolchain_manager_msg, highlight=False)
self.exit()

# Check if ncs version was even detected, this can happen in the cases where
# normal zephyr repo is used
if self.detected_ncs_version is None:
self.use_toolchain_manager = False
return

# Exit if manager is not installed
if not self.check_exe(self.consts["nrf_toolchain_manager_path"]):
self.print(no_toolchain_manager_msg, highlight=False)
self.exit()

# If it is installed then we should use it
self.use_toolchain_manager = True

# Early exit if toolchain for detected ncs version is installed
result = self.run_manager("list", silent=True, return_output=True)
if self.detected_ncs_version in result["output"]:
# If it is installed then is also supported
self.use_toolchain_manager = True
return

# Check if toolchain for detected ncs version is supported
Expand Down

0 comments on commit 6dade7d

Please sign in to comment.