Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
commands: fix "no workspace" and other error paths
Commit 2ac3e27 ("WestCommand: use Configuration objects") introduced a configuration attribute to WestCommand instances, and used it to look up configuration options. However, it stored this attribute at the wrong time in WestCommand.run(). We need to stash the configuration before doing anything else, because otherwise calls like self.die() in the same method will look up self.color_ui, which looks up the configuration, which isn't present, which calls self.die(), leading to an infinite recursion. If we stash the configuration immediately, we instead have a valid configuration option and we get an error printed instead. Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
- Loading branch information