Fix Windows installer network mode selection not accepting Enter key#270
Open
hobostay wants to merge 2 commits intoagentscope-ai:mainfrom
Open
Fix Windows installer network mode selection not accepting Enter key#270hobostay wants to merge 2 commits intoagentscope-ai:mainfrom
hobostay wants to merge 2 commits intoagentscope-ai:mainfrom
Conversation
…sync This commit improves the error handling in the copaw-worker's sync.py to provide more helpful diagnostic messages when MinIO operations fail, addressing issue agentscope-ai#200. Changes: 1. **Enhanced mc binary not found error** - Added installation instructions for different platforms 2. **Added endpoint validation** - Warns when using Higress Console ports (18080/18001) instead of MinIO ports (9000/9001) 3. **Improved mc alias set error handling** - Provides detailed error messages for common issues: - Connection refused (possible causes and troubleshooting steps) - Authentication failures (credential validation tips) 4. **Better openclaw.json not found error** - Includes expected path and troubleshooting command 5. **Added JSON parsing error handling** - Catches JSONDecodeError with helpful context 6. **Reduced log verbosity** - Changed mc command logs from INFO to DEBUG level to reduce noise These changes help users diagnose common configuration issues, particularly: - Using wrong endpoint URL (Higress Console vs MinIO) - Connection problems - Authentication issues - Missing worker configuration Fixes agentscope-ai#200 (partial - improves error messages; root cause may still need user to correct their --fs parameter) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Issue agentscope-ai#257 reports that in the Windows installer, when the network mode selection prompt is displayed, pressing Enter without typing anything skips the selection and defaults to "local only" mode. Root Cause: The condition `if (-not $localChoice)` fails to detect empty string input. In PowerShell: - Read-Host returns empty string "" (not $null) when user presses Enter - -not "" evaluates to $false (only empty string is falsy) - So the default value "1" is never applied when user just presses Enter Fix: Changed from `if (-not $localChoice)` to `if ([string]::IsNullOrEmpty($localChoice))` which correctly handles both $null and empty string cases. This allows users to press Enter to accept the default "local only" option (option 1), as the prompt text suggests with "(press Enter for defaults)". Fixes agentscope-ai#257 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
-not $localChoiceto[string]::IsNullOrEmpty($localChoice)Problem
Issue #257 reports that in the Windows installer, the network mode selection prompt doesn't work as expected. When users press Enter without typing anything, the selection is skipped and defaults to "local only" mode without proper interaction.
Root Cause
The condition used to check for empty input was incorrect:
In PowerShell:
Read-Hostreturns an empty string""(not$null) when user presses Enter-not ""evaluates to$false(only empty string is falsy)Solution
Changed to use
[string]::IsNullOrEmpty()which correctly handles both$nulland empty string cases:Testing
This aligns with the installer's "(press Enter for defaults)" behavior described in the documentation.
Related
The documentation mentions "(press Enter for defaults)" multiple times, and this fix ensures that behavior works correctly in the network mode selection.
Fixes #257
🤖 Generated with Claude Code