Skip to content

Commit

Permalink
Fix thumbnail creation on Windows (#5929)
Browse files Browse the repository at this point in the history
  • Loading branch information
willeastcott authored Jan 8, 2024
1 parent 9c5289b commit c0295b3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/scripts/thumbnails.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ async function main() {
// npx serve dist --config ../serve.json
// Reason: https://github.com/vercel/serve/issues/732
// (who *ever* thought that stripping .html was a good idea in the first place...)
const server = spawn('serve', ['dist', '-l', port, '--no-request-logging', '--config', '../serve.json']);
const cmd = process.platform === 'win32' ? 'npx.cmd' : 'npx';
const server = spawn(cmd, ['serve', 'dist', '-l', port, '--no-request-logging', '--config', '../serve.json']);
await sleep(1000); // give a second to spawn server
console.log("Starting puppeteer screenshot process");
try {
Expand Down

0 comments on commit c0295b3

Please sign in to comment.