Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 19 additions & 7 deletions bin/omarchy-windows-vm
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,25 @@ EOF
USERNAME="docker"
fi

PASSWORD=$(gum input --placeholder="Password (Press enter to use default: admin)" --password --header="Enter Windows password:")
if [ -z "$PASSWORD" ]; then
PASSWORD="admin"
PASSWORD_DISPLAY="(default)"
else
PASSWORD_DISPLAY="(user-defined)"
fi
# Password input with validation loop
while true; do
PASSWORD=$(gum input --placeholder="Enter password (leave empty to use default 'admin' with confirmation)" --password --header="Enter Windows password:")

if [ -z "$PASSWORD" ]; then
# If password is empty, ask user what they want to do
if gum confirm "Use default password 'admin'?"; then
PASSWORD="admin"
PASSWORD_DISPLAY="(default)"
break
else
# User wants to enter a password, loop again
continue
fi
else
PASSWORD_DISPLAY="(user-defined)"
break
fi
done

# Display configuration summary
gum style \
Expand Down