Avoid duplicate user prefix in container names
This commit is contained in:
@@ -3373,10 +3373,9 @@ def build_container_command(
|
|||||||
|
|
||||||
home_dir = Path(os.environ.get("HOME") or str(Path.home()))
|
home_dir = Path(os.environ.get("HOME") or str(Path.home()))
|
||||||
card_path_text = str(card_path)
|
card_path_text = str(card_path)
|
||||||
user_name = current_user_slug()
|
|
||||||
session_slug = slug_value(session_name, "tmux session name")
|
session_slug = slug_value(session_name, "tmux session name")
|
||||||
instance_name = slug_value(instance, "container instance")
|
instance_name = slug_value(instance, "container instance")
|
||||||
container_name_parts = [user_name, session_slug]
|
container_name_parts = [session_slug]
|
||||||
if profile not in session_slug.split("-"):
|
if profile not in session_slug.split("-"):
|
||||||
container_name_parts.append(profile)
|
container_name_parts.append(profile)
|
||||||
container_name_parts.append(instance_name)
|
container_name_parts.append(instance_name)
|
||||||
|
|||||||
Reference in New Issue
Block a user