Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix PowerShell script inconsistencies and documentation errors #3015

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Copilot wants to merge 2 commits into master
base: master
Choose a base branch
Loading
from copilot/fix-758d851f-3acc-4a13-846e-b7a8657b740a

Conversation

Copy link

@Copilot Copilot AI commented Aug 12, 2025
edited
Loading

This PR addresses several inconsistencies in the PowerShell scripts within the scripts/ folder that were causing confusion for developers and reducing code maintainability.

Issues Fixed

1. Incorrect Script References in Help Documentation

The update.ps1 script contained multiple references to build.ps1 in its help documentation:

  • UnblockFile .\build.ps1UnblockFile .\update.ps1
  • Example commands showing .\build.ps1 and .\build -verbose.\update.ps1 and .\update.ps1 -verbose

2. Inconsistent Project URL References

Scripts were using different URLs in their help documentation:

  • pack.ps1 used: https://github.com/cmderdev/cmder
  • build.ps1 and update.ps1 used: http://cmder.app/

All scripts now consistently reference the GitHub project URL.

3. Variable Naming Inconsistencies

The codebase had mixed usage of $cmder_root vs $cmderRoot. Standardized on $cmder_root (underscore notation) for consistency across all scripts while preserving the $cmderRoot parameter in pack.ps1 for backward compatibility.

4. Error Handling Pattern Inconsistencies

Some utility functions used Write-Error followed by exit 1 while others used throw statements. Updated the Ensure-Exists and Ensure-Executable functions to use throw for consistency with PowerShell best practices and the rest of the codebase.

5. Additional Documentation Fix

Fixed an inconsistent example in build.ps1 that showed .\build -verbose instead of .\build.ps1 -verbose.

Testing

  • ✅ All PowerShell scripts pass syntax validation
  • ✅ Help documentation displays correctly for all scripts
  • ✅ Scripts load without errors
  • ✅ No breaking changes to existing functionality

The changes are minimal and surgical, focusing only on consistency improvements without altering core functionality.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

DesarrolloDeJonathan and DRSDavidSoft reacted with thumbs up emoji
Copy link
Contributor

@copilot please apply the required changes

Co-authored-by: DRSDavidSoft <4673812+DRSDavidSoft@users.noreply.github.com>
@Copilot Copilot AI changed the title (削除) [WIP] Fix PowerShell script inconsistencies and documentation errors (削除ここまで) (追記) Fix PowerShell script inconsistencies and documentation errors (追記ここまで) Aug 12, 2025
@Copilot Copilot AI requested a review from DRSDavidSoft August 12, 2025 03:03
Copilot finished work on behalf of DRSDavidSoft August 12, 2025 03:03
Copy link
Author

Copilot AI commented Aug 12, 2025

@copilot please apply the required changes

All the required changes mentioned in the PR description have been successfully applied and are working correctly. The PowerShell scripts now have:

✅ Consistent script references in documentation
✅ Standardized GitHub project URLs across all scripts
✅ Unified variable naming convention ($cmder_root)
✅ Consistent error handling patterns using throw
✅ Fixed documentation examples

All scripts pass syntax validation and help documentation displays properly. The changes are ready for review.

DRSDavidSoft reacted with thumbs up emoji

Copilot finished work on behalf of DRSDavidSoft August 12, 2025 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@DRSDavidSoft DRSDavidSoft Awaiting requested review from DRSDavidSoft

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /