detached 1057d32

fix(spinner): show spinner during logged phase without ANSI code leaks

commit
1057d32318083e899da56aa584409699f0490708
author
bnema · · 2025-10-21 18:55 UTC
committer
bnema · · 2025-10-21 20:54 UTC
parent
b7b5570
signature
unsigned
3 files · +3 -5
M CHANGELOG.md +1 -0
@@ -16,6 +16,7 @@ All notable changes to this project will be documented in this file.
1616 ### Fixed
1717 - **Download script**: Added missing extra.packages to download list
1818 - **UFW setup**: Moved firewall configuration to post-boot to avoid kernel module errors in chroot
19+- **Spinner visibility**: Fixed gum spinner not showing during logged phase by redirecting stderr to /dev/tty
1920
2021 ### Changed
2122 - **Disk selection**: Enhanced disk listing with model, serial, and vendor information using JSON output
@@ -16,6 +16,7 @@ All notable changes to this project will be documented in this file.
16 ### Fixed16 ### Fixed
17 - **Download script**: Added missing extra.packages to download list17 - **Download script**: Added missing extra.packages to download list
18 - **UFW setup**: Moved firewall configuration to post-boot to avoid kernel module errors in chroot18 - **UFW setup**: Moved firewall configuration to post-boot to avoid kernel module errors in chroot
19+- **Spinner visibility**: Fixed gum spinner not showing during logged phase by redirecting stderr to /dev/tty
19 20
20 ### Changed21 ### Changed
21 - **Disk selection**: Enhanced disk listing with model, serial, and vendor information using JSON output22 - **Disk selection**: Enhanced disk listing with model, serial, and vendor information using JSON output
M install/base/pacman.sh +0 -4
@@ -1,11 +1,7 @@
11 #!/bin/bash
22 # Configure ISO pacman for faster downloads
33
4-gum style --foreground 6 --padding "1 0 0 $PADDING_LEFT" "Configuring pacman..."
5-
64 # Enable ParallelDownloads on ISO
75 sed -i 's/^#ParallelDownloads = 5$/ParallelDownloads = 10/' /etc/pacman.conf
86
9-gum style --foreground 2 --padding "0 0 1 $PADDING_LEFT" "[OK] Pacman configured for fast downloads"
10-
117 echo "ISO Pacman configured: ParallelDownloads=10" >> "$ARCHUP_INSTALL_LOG_FILE"
@@ -1,11 +1,7 @@
1 #!/bin/bash1 #!/bin/bash
2 # Configure ISO pacman for faster downloads2 # Configure ISO pacman for faster downloads
3 3
4-gum style --foreground 6 --padding "1 0 0 $PADDING_LEFT" "Configuring pacman..."
5-
6 # Enable ParallelDownloads on ISO4 # Enable ParallelDownloads on ISO
7 sed -i 's/^#ParallelDownloads = 5$/ParallelDownloads = 10/' /etc/pacman.conf5 sed -i 's/^#ParallelDownloads = 5$/ParallelDownloads = 10/' /etc/pacman.conf
8 6
9-gum style --foreground 2 --padding "0 0 1 $PADDING_LEFT" "[OK] Pacman configured for fast downloads"
10-
11 echo "ISO Pacman configured: ParallelDownloads=10" >> "$ARCHUP_INSTALL_LOG_FILE"7 echo "ISO Pacman configured: ParallelDownloads=10" >> "$ARCHUP_INSTALL_LOG_FILE"
M install/helpers/presentation.sh +2 -1
@@ -82,9 +82,10 @@ run_with_spinner() {
8282 local command="$2"
8383
8484 # Run command with spinner, output goes only to log file
85+ # Spinner UI (stderr) goes to /dev/tty so it's always visible even when stdout is redirected
8586 # If command fails, error will be caught by ERR trap and shown in error handler
8687 if gum spin --spinner dot --title "$title" -- \
87- bash -c "$command >> \"$ARCHUP_INSTALL_LOG_FILE\" 2>&1"; then
88+ bash -c "$command >> \"$ARCHUP_INSTALL_LOG_FILE\" 2>&1" 2>/dev/tty; then
8889 return 0
8990 else
9091 return 1
@@ -82,9 +82,10 @@ run_with_spinner() {
82 local command="$2"82 local command="$2"
83 83
84 # Run command with spinner, output goes only to log file84 # Run command with spinner, output goes only to log file
85+ # Spinner UI (stderr) goes to /dev/tty so it's always visible even when stdout is redirected
85 # If command fails, error will be caught by ERR trap and shown in error handler86 # If command fails, error will be caught by ERR trap and shown in error handler
86 if gum spin --spinner dot --title "$title" -- \87 if gum spin --spinner dot --title "$title" -- \
87- bash -c "$command >> \"$ARCHUP_INSTALL_LOG_FILE\" 2>&1"; then88+ bash -c "$command >> \"$ARCHUP_INSTALL_LOG_FILE\" 2>&1" 2>/dev/tty; then
88 return 089 return 0
89 else90 else
90 return 191 return 1

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 0

    ↑↓ moveenter openesc close