|
26 | 26 | import validators |
27 | 27 |
|
28 | 28 | from stack.config.util import get_config_setting |
29 | | -from stack.log import log_debug, output_main |
| 29 | +from stack.log import log_debug, log_info |
30 | 30 | from stack.util import error_exit |
31 | 31 |
|
| 32 | + |
32 | 33 | DEFAULT_URL = "https://github.com/bozemanpass/stack/releases/latest/download/stack" |
33 | 34 |
|
34 | 35 |
|
@@ -70,20 +71,15 @@ def command(ctx, check_only, distribution_url): |
70 | 71 | # Check if the downloaded file is identical to the existing one |
71 | 72 | same = filecmp.cmp(temp_download_path, shiv_binary_path) |
72 | 73 | if same: |
73 | | - if not ctx.obj.quiet or check_only: |
74 | | - output_main("No update available, latest version already installed") |
| 74 | + log_info("No update available, latest version already installed") |
75 | 75 | else: |
76 | | - if not ctx.obj.quiet: |
77 | | - output_main("Update available") |
| 76 | + log_debug("Update available") |
78 | 77 | if check_only: |
79 | | - if not ctx.obj.quiet: |
80 | | - output_main("Check-only node, update not installed") |
| 78 | + log_info("Check-only node, update not installed") |
81 | 79 | else: |
82 | | - if not ctx.obj.quiet: |
83 | | - output_main("Installing...") |
| 80 | + log_debug("Installing...") |
84 | 81 | log_debug(f"Replacing: {shiv_binary_path} with {temp_download_path}") |
85 | 82 | current_permissions = stat.S_IMODE(os.lstat(shiv_binary_path).st_mode) |
86 | 83 | os.replace(temp_download_path, shiv_binary_path) |
87 | 84 | os.chmod(shiv_binary_path, current_permissions) |
88 | | - if not ctx.obj.quiet: |
89 | | - output_main('Run "stack version" to see the newly installed version') |
| 85 | + log_info('Run "stack version" to see the newly installed version') |
0 commit comments