@@ -39,8 +39,7 @@ def _detect_tool_overrides(plat_key):
3939def _write_text (path , content , dry_run , force , console ):
4040 if path .exists () and not force :
4141 console .print (
42- f"[yellow]![/yellow] Skipping { path .name } "
43- "(already exists; use --force)"
42+ f"[yellow]![/yellow] Skipping { path .name } (already exists; use --force)"
4443 )
4544 return True
4645 if dry_run :
@@ -71,8 +70,7 @@ def setup_concore(console, dry_run=False, force=False):
7170 if tool_overrides :
7271 tools_content = "\n " .join (f"{ k } ={ v } " for k , v in tool_overrides ) + "\n "
7372 wrote_any = (
74- _write_text (tools_file , tools_content , dry_run , force , console )
75- or wrote_any
73+ _write_text (tools_file , tools_content , dry_run , force , console ) or wrote_any
7674 )
7775 else :
7876 console .print ("[yellow]![/yellow] No tool paths detected for concore.tools" )
@@ -81,18 +79,16 @@ def setup_concore(console, dry_run=False, force=False):
8179 if docker_command :
8280 sudo_content = f"{ docker_command } \n "
8381 wrote_any = (
84- _write_text (sudo_file , sudo_content , dry_run , force , console )
85- or wrote_any
82+ _write_text (sudo_file , sudo_content , dry_run , force , console ) or wrote_any
8683 )
8784 else :
88- console .print ("[yellow]![/yellow] Docker/Podman not detected; not writing concore.sudo" )
85+ console .print (
86+ "[yellow]![/yellow] Docker/Podman not detected; not writing concore.sudo"
87+ )
8988
9089 octave_file = Path (concore_path ) / "concore.octave"
9190 if octave_found :
92- wrote_any = (
93- _write_text (octave_file , "" , dry_run , force , console )
94- or wrote_any
95- )
91+ wrote_any = _write_text (octave_file , "" , dry_run , force , console ) or wrote_any
9692 else :
9793 console .print ("[dim]-[/dim] Octave not detected; not writing concore.octave" )
9894
@@ -104,4 +100,4 @@ def setup_concore(console, dry_run=False, force=False):
104100 console .print ("[green]Dry run complete.[/green]" )
105101 else :
106102 console .print ("[green]Setup complete.[/green]" )
107- return True
103+ return True
0 commit comments