Skip to content

Commit

Permalink
Merge pull request #9 from itoffshore/menus
Browse files Browse the repository at this point in the history
add template context to version menu
  • Loading branch information
itoffshore committed Oct 14, 2023
2 parents 23e6ebf + a91c8e4 commit a1a1dc5
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 3 deletions.
Binary file removed dist/distrobuilder_menu-0.1.4.tar.gz
Binary file not shown.
Binary file not shown.
Binary file added dist/distrobuilder_menu-0.1.5.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build-backend = "hatchling.build"

[project]
name = "distrobuilder_menu"
version = "0.1.4"
version = "0.1.5"
authors = [
{ name="Stuart Cardall", email="developer@it-offshore.co.uk" },
]
Expand Down
4 changes: 3 additions & 1 deletion src/distrobuilder_menu/menus/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,10 +460,12 @@ def create_custom_override():
return

template_files = utils.find_files('*.yaml', template_dir)
template_type = helpers.get_template_type(template_dir)

# menu_templates() returns a tuple: os_name, template_path
src_template = shared.menu_templates(template_files, template_dir, 'Create Override from',
custom_question='Choose SOURCE template to override')[1]
custom_question=f"Choose SOURCE {template_type} template to override"
)[1]
# return to main event loop
if src_template == 'user_quit':
return
Expand Down
2 changes: 1 addition & 1 deletion src/distrobuilder_menu/menus/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def menu_templates(template_dict, template_dir, action, custom_question=None):

# container_type only relevant when building templates
if template_dir in (USER_CONFIG.subdir_custom, USER_CONFIG.subdir_images):
# ARGS.lxd is always true so check lxc
# ARGS.lxd is usually true so check lxc
if ARGS.lxc:
container_type = 'LXC'
else:
Expand Down

0 comments on commit a1a1dc5

Please sign in to comment.