Skip to content

Commit 8264480

Browse files
committed
Fix update
1 parent 41cb339 commit 8264480

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

src/stack/update.py

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@
2626
import validators
2727

2828
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
3030
from stack.util import error_exit
3131

32+
3233
DEFAULT_URL = "https://github.com/bozemanpass/stack/releases/latest/download/stack"
3334

3435

@@ -70,20 +71,15 @@ def command(ctx, check_only, distribution_url):
7071
# Check if the downloaded file is identical to the existing one
7172
same = filecmp.cmp(temp_download_path, shiv_binary_path)
7273
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")
7575
else:
76-
if not ctx.obj.quiet:
77-
output_main("Update available")
76+
log_debug("Update available")
7877
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")
8179
else:
82-
if not ctx.obj.quiet:
83-
output_main("Installing...")
80+
log_debug("Installing...")
8481
log_debug(f"Replacing: {shiv_binary_path} with {temp_download_path}")
8582
current_permissions = stat.S_IMODE(os.lstat(shiv_binary_path).st_mode)
8683
os.replace(temp_download_path, shiv_binary_path)
8784
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

Comments
 (0)