Skip to content

Commit

Permalink
update client cfg in swagger generation
Browse files Browse the repository at this point in the history
  • Loading branch information
AllyW committed Feb 18, 2025
1 parent bdd7450 commit 93e95bb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/aaz_dev/command/controller/workspace_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1055,10 +1055,12 @@ def generate_to_aaz(self):
# Merge the commands of subresources which exported in aaz but not exist in current workspace
self._merge_sub_resources_in_aaz()

# update client config
editor = self.load_client_cfg_editor()
if editor:
self.aaz_specs.update_client_cfg(editor.cfg)
# in memory worspace folder does not support client cfg
if not self.is_in_memory:
# update client config
editor = self.load_client_cfg_editor()
if editor:
self.aaz_specs.update_client_cfg(editor.cfg)

# update configurations
for ws_leaf in self.iter_command_tree_leaves():
Expand Down Expand Up @@ -1243,8 +1245,6 @@ def create_cfg_editor(self, auth, templates=None, cloud_medadata=None, arm_resou
def load_client_cfg_editor(self, reload=False):
if not reload and self._client_cfg_editor:
return self._client_cfg_editor
if self.is_in_memory:
return None
assert not self.is_in_memory
try:
self._client_cfg_editor = WorkspaceClientCfgEditor.load_client_cfg(self.folder)
Expand Down

0 comments on commit 93e95bb

Please sign in to comment.