Skip to content

Commit

Permalink
fix: fixed f-string that somehow validates locally
Browse files Browse the repository at this point in the history
  • Loading branch information
evilsocket committed Nov 15, 2024
1 parent b89aff8 commit f5ddd14
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dreadnode_cli/agent/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,10 @@ def push(
raise Exception("No server profile is set, use [bold]dreadnode login[/] to authenticate")

if not agent_config.is_linked_to_profile(user_config.active_profile_name):
linked_profiles = ", ".join(agent_config.linked_profiles)
plural = "s" if len(agent_config.linked_profiles) > 1 else ""
raise Exception(
f"This agent is linked to the [magenta]{", ".join(agent_config.linked_profiles)}[/] server profile{'s' if len(agent_config.linked_profiles) > 1 else ''}, but the current server profile is [yellow]{user_config.active_profile_name}[/], create the agent again."
f"This agent is linked to the [magenta]{linked_profiles}[/] server profile{plural}, but the current server profile is [yellow]{user_config.active_profile_name}[/], create the agent again."
)

server_config = user_config.get_server_config()
Expand Down

0 comments on commit f5ddd14

Please sign in to comment.