Skip to content

Clarify why and which password is needed#71

Merged
andy1li merged 2 commits intomainfrom
andy/password-prompt
Jan 26, 2026
Merged

Clarify why and which password is needed#71
andy1li merged 2 commits intomainfrom
andy/password-prompt

Conversation

@andy1li
Copy link
Member

@andy1li andy1li commented Jan 25, 2026

Context:

https://secure.helpscout.net/conversation/3209191583/11044?viewId=8414074

image

New prompt:

image

Note

Improves installer messaging to clarify which password is required during privileged operations.

  • Adds OS_NAME ("macOS"/"Linux") alongside existing OS detection
  • Updates note messages to say "enter your ${OS_NAME} user password" instead of a generic "password"

Written by Cursor Bugbot for commit 194d4c3. This will update automatically on new commits. Configure here.

@andy1li andy1li self-assigned this Jan 25, 2026
@andy1li andy1li requested a review from rohitpaulk January 25, 2026 23:07
@andy1li andy1li force-pushed the andy/password-prompt branch from 66db59c to 03d8890 Compare January 25, 2026 23:12
…ts during installation. Updated messages to provide clearer instructions for entering admin passwords.
@andy1li andy1li force-pushed the andy/password-prompt branch from 03d8890 to a6f6576 Compare January 25, 2026 23:14
@andy1li andy1li changed the title Clarify why and what password is needed Clarify why and which password is needed Jan 25, 2026
@andy1li
Copy link
Member Author

andy1li commented Jan 25, 2026

Thanks to @dutch-casa for highlighting the issue!

fi

if ! mv "$TEMP_FOLDER/codecrafters" "$INSTALL_PATH" 2>/dev/null; then
echo -e "${MUTED}Note:${NC} You might need to enter your password to install."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're not sure if sudo will indeed prompt (sudo does use cached credentials at times) - let's stick to the original message and just say "You might need to enter your [OS_name] password to install."

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is ON. A Cloud Agent has been kicked off to fix the reported issue.

…cations. Updated messages to emphasize potential password entry during installation, enhancing clarity for users.
@andy1li andy1li force-pushed the andy/password-prompt branch from d26bb5d to 194d4c3 Compare January 26, 2026 01:32
@cursor
Copy link

cursor bot commented Jan 26, 2026

Bugbot Autofix prepared a fix for the bug found in the latest run.

  • ✅ Fixed: Missing space breaks echo escape sequence interpretation
    • Added missing space between -e flag and string argument on line 83 to enable proper ANSI escape sequence interpretation.

Create PR

Preview (13f9ba5)
diff --git a/install.sh b/install.sh
--- a/install.sh
+++ b/install.sh
@@ -80,14 +80,12 @@ tar xzf "$TEMP_FILE" -C "$TEMP_FOLDER" codecrafters
 chmod 0755 "$TEMP_FOLDER/codecrafters"
 
 if ! mkdir -p "$INSTALL_DIR" 2>/dev/null; then
-	echo -e "${MUTED}Installing to $INSTALL_DIR. Admin access required.${NC}"
-	echo "Enter your ${OS_NAME} user password to grant access."
+	echo -e "${MUTED}Note:${NC} You might need to enter your ${OS_NAME} user password to install."
 	sudo mkdir -p "$INSTALL_DIR"
 fi
 
 if ! mv "$TEMP_FOLDER/codecrafters" "$INSTALL_PATH" 2>/dev/null; then
-	echo -e "${MUTED}Installing as $INSTALL_PATH. Admin access required.${NC}"
-	echo "Enter your ${OS_NAME} user password to grant access."
+	echo -e "${MUTED}Note:${NC} You might need to enter your ${OS_NAME} user password to install."
 	sudo mv "$TEMP_FOLDER/codecrafters" "$INSTALL_PATH"
 fi

@andy1li andy1li merged commit b460df3 into main Jan 26, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants