@@ -317,6 +317,7 @@ def __call__(self):
317317 self ._shown = True
318318 LOGGER .print ("!G!Welcome to the Python installation manager "
319319 "configuration helper.!W!" )
320+ line_break ()
320321
321322
322323def line_break ():
@@ -329,18 +330,17 @@ def first_run(cmd):
329330 if not cmd .enabled :
330331 return
331332
333+ shown_any = False
334+
332335 welcome = _Welcome ()
333336 if cmd .explicit :
334337 welcome ()
335-
336- shown_any = False
338+ shown_any = True
337339
338340 if cmd .check_app_alias :
339341 r = check_app_alias (cmd )
340342 if not r :
341343 welcome ()
342- line_break ()
343- shown_any = True
344344 LOGGER .print ("!Y!Your app execution alias settings are configured to launch "
345345 "other commands besides 'py' and 'python'.!W!" ,
346346 level = logging .WARN )
@@ -358,17 +358,18 @@ def first_run(cmd):
358358 "!B!App execution aliases!W! page and scroll to the "
359359 "'!B!Python!W!' entries to enable the new commands." ,
360360 wrap = True )
361+ line_break ()
362+ shown_any = True
361363 elif cmd .explicit :
362364 if r == "skip" :
363365 LOGGER .info ("Skipped app execution aliases check" )
364366 else :
365367 LOGGER .info ("Checked app execution aliases" )
368+ line_break ()
366369
367370 if cmd .check_long_paths :
368371 if not check_long_paths (cmd ):
369372 welcome ()
370- line_break ()
371- shown_any = True
372373 LOGGER .print ("!Y!Windows is not configured to allow paths longer than "
373374 "260 characters.!W!" , level = logging .WARN )
374375 LOGGER .print ("\n Python and some other apps can exceed this limit, "
@@ -378,33 +379,35 @@ def first_run(cmd):
378379 "path support enabled.\n " , wrap = True )
379380 if not cmd .confirm or not cmd .ask_ny ("Update setting now?" ):
380381 do_configure_long_paths (cmd )
382+ line_break ()
383+ shown_any = True
381384 elif cmd .explicit :
382385 LOGGER .info ("Checked system long paths setting" )
386+ line_break ()
383387
384388 if cmd .check_py_on_path :
385389 r = check_py_on_path (cmd )
386390 if not r :
387391 welcome ()
388- line_break ()
389- shown_any = True
390392 LOGGER .print ("!Y!The legacy 'py' command is still installed.!W!" , level = logging .WARN )
391393 LOGGER .print ("\n This may interfere with launching the new 'py' "
392394 "command, and may be resolved by uninstalling "
393395 "'!B!Python launcher!W!'.\n " , wrap = True )
394396 if cmd .confirm and not cmd .ask_ny ("Open Installed apps now?" ):
395397 os .startfile ("ms-settings:appsfeatures" )
398+ line_break ()
399+ shown_any = True
396400 elif cmd .explicit :
397401 if r == "skip" :
398402 LOGGER .info ("Skipped check for legacy 'py' command" )
399403 else :
400404 LOGGER .info ("Checked PATH for legacy 'py' command" )
405+ line_break ()
401406
402407 if cmd .check_global_dir :
403408 r = check_global_dir (cmd )
404409 if not r :
405410 welcome ()
406- line_break ()
407- shown_any = True
408411 LOGGER .print ("!Y!The global shortcuts directory is not "
409412 "configured.!W!" , level = logging .WARN )
410413 LOGGER .print ("\n Configuring this enables commands like "
@@ -423,18 +426,19 @@ def first_run(cmd):
423426 not cmd .ask_ny ("Add commands directory to your PATH now?" )
424427 ):
425428 do_global_dir_on_path (cmd )
429+ line_break ()
430+ shown_any = True
426431 elif cmd .explicit :
427432 if r == "skip" :
428433 LOGGER .info ("Skipped check for commands directory on PATH" )
429434 else :
430435 LOGGER .info ("Checked PATH for versioned commands directory" )
436+ line_break ()
431437
432438 # This check must be last, because a failed install may exit the program.
433439 if cmd .check_any_install :
434440 if not check_any_install (cmd ):
435441 welcome ()
436- line_break ()
437- shown_any = True
438442 LOGGER .print ("!Y!You do not have any Python runtimes installed.!W!" ,
439443 level = logging .WARN )
440444 LOGGER .print ("\n Install the current latest version of CPython? If "
@@ -444,14 +448,15 @@ def first_run(cmd):
444448 LOGGER .info ("" )
445449 if not cmd .confirm or cmd .ask_yn ("Install CPython now?" ):
446450 do_install (cmd )
451+ line_break ()
452+ shown_any = True
447453 elif cmd .explicit :
448454 LOGGER .info ("Checked for any Python installs" )
455+ line_break ()
449456
450457 if cmd .check_latest_install :
451458 if not check_latest_install (cmd ):
452459 welcome ()
453- line_break ()
454- shown_any = True
455460 LOGGER .print ("!Y!You do not have the latest Python runtime.!W!" ,
456461 level = logging .WARN )
457462 LOGGER .print ("\n Install the current latest version of CPython? If "
@@ -460,11 +465,13 @@ def first_run(cmd):
460465 LOGGER .info ("" )
461466 if not cmd .confirm or cmd .ask_yn ("Install CPython now?" ):
462467 do_install (cmd )
468+ line_break ()
469+ shown_any = True
463470 elif cmd .explicit :
464471 LOGGER .info ("Checked for the latest available Python install" )
472+ line_break ()
465473
466- if shown_any or cmd .explicit :
467- line_break ()
474+ if shown_any :
468475 LOGGER .print ("!G!Configuration checks completed.!W!" , level = logging .WARN )
469476 LOGGER .print ("\n To run these checks again, launch !B!Python install "
470477 "manager!W! from your Start menu, or !B!py install "
0 commit comments