Skip to content

Conversation

@M4dhav
Copy link

@M4dhav M4dhav commented Dec 3, 2025

What does this PR do?

This PR adds the Powershell script back to the site after it was removed by some previous PR

Test Plan

Run the website and go to /cli/install.ps1

Related PRs and Issues

fixes #2641

Have you read the Contributing Guidelines on issues?

Yes

Summary by CodeRabbit

  • New Features
    • Added a redirect endpoint for the PowerShell installer that forwards users to the external install.ps1 location. This ensures requests to the installer URL are redirected (HTTP 301) to the hosted script for easy access.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 3, 2025

Walkthrough

A new server-side route handler file is created at src/routes/cli/install.ps1/+page.server.ts. The file imports the redirect function from @sveltejs/kit and exports a parameterless load() function that immediately issues a 301 HTTP redirect to an external install.ps1 script URL. There is no conditional logic or additional processing.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Single new file with minimal code
  • Straightforward redirect logic with no branching or complex patterns
  • Review focus: verify the redirect target URL and that 301 is the intended status code

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the primary change: restoring the PowerShell script endpoint to fix the 404 issue for Windows CLI installations.
Linked Issues check ✅ Passed The PR addresses the core requirement from issue #2641 by creating a route that serves the PowerShell install script, enabling remote installation via the iwr command.
Out of Scope Changes check ✅ Passed The single file change (new route for /cli/install.ps1) is directly aligned with fixing issue #2641; no out-of-scope modifications are present.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4635482 and 9160056.

📒 Files selected for processing (1)
  • src/routes/cli/install.ps1/+page.server.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/routes/cli/install.ps1/+page.server.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 37fd4f1 and 4635482.

📒 Files selected for processing (1)
  • src/routes/cli/install.ps1/+page.server.ts (1 hunks)
🔇 Additional comments (1)
src/routes/cli/install.ps1/+page.server.ts (1)

3-5: The code is correct as written and does not require modification.

SvelteKit v2+ changed the redirect() function behavior: it now throws automatically without requiring an explicit throw keyword. The current implementation redirect(301, 'https://raw.githubusercontent.com/appwrite/sdk-for-cli/refs/heads/master/install.ps1') will work correctly. Adding throw before it would be incorrect for SvelteKit v2+.

Likely an incorrect or invalid review comment.

@HarshMN2345
Copy link
Member

heyy @M4dhav, thanks for your contribution. can you run pnpm format?

@M4dhav
Copy link
Author

M4dhav commented Dec 4, 2025

heyy @M4dhav, thanks for your contribution. can you run pnpm format?

After running pnpm format git shows changes in 675 files, please confirm that you want me to commit this, or do you only want me to run it on the added file and commit that

@M4dhav
Copy link
Author

M4dhav commented Dec 4, 2025

Hey @HarshMN2345 @ChiragAgg5k I noticed that tests were failing on my PR so I tried to investigate it but it looks like build is failing on the main branch as well, but tests are running on my local. How do you want me to proceed?

@M4dhav
Copy link
Author

M4dhav commented Dec 4, 2025

Hey @HarshMN2345 @ChiragAgg5k I noticed that tests were failing on my PR so I tried to investigate it but it looks like build is failing on the main branch as well, but tests are running on my local. How do you want me to proceed?

I think builds on my local might be failing due to sentry not being setup

@M4dhav
Copy link
Author

M4dhav commented Dec 6, 2025

Hey @HarshMN2345 I investigated the tests further, as they were running locally. I ran the tests job on my fork and they passed, where the only difference is environment variables. Were the vars changed recently? If so, they might be causing the workflow runs to fail

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.

Windows CLI Script cannot be installed due to 404

3 participants