Skip to content
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

Fix create-astro on Windows #5616

Merged
merged 2 commits into from
Dec 16, 2022
Merged
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions .changeset/violet-parents-mix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'create-astro': patch
---

Skip Houston on Windows until we can debug the prompt issue
2 changes: 1 addition & 1 deletion packages/create-astro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"tsconfigs"
],
"dependencies": {
"@astrojs/cli-kit": "^0.1.4",
"@astrojs/cli-kit": "^0.1.6",
"chalk": "^5.0.1",
"comment-json": "^4.2.3",
"execa": "^6.1.0",
Expand Down
3 changes: 3 additions & 0 deletions packages/create-astro/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import fs from 'fs';
import { downloadTemplate } from 'giget';
import { bold, dim, green, reset, yellow } from 'kleur/colors';
import ora from 'ora';
import { platform } from 'os';
import path from 'path';
import prompts from 'prompts';
import detectPackageManager from 'which-pm-runs';
Expand All @@ -30,6 +31,8 @@ import { TEMPLATES } from './templates.js';
// fixes the issue so that create-astro now works on all npm version.
const cleanArgv = process.argv.filter((arg) => arg !== '--');
const args = yargs(cleanArgv, { boolean: ['fancy'] });
// Always skip Houston on Windows (for now)
if (platform() === 'win32') args.skipHouston = true;
Copy link
Contributor

Choose a reason for hiding this comment

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

sad houston beep boops

prompts.override(args);

// Enable full unicode support if the `--fancy` flag is passed
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.