Skip to content

Commit 072fe86

Browse files
committed
update wording of prepare script message
1 parent eef885b commit 072fe86

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/kit/src/cli.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,12 @@ prog
4545

4646
// TODO remove for 1.0
4747
if (event === 'prepare') {
48-
const message = `\`svelte-kit sync\` now runs on "postinstall" — please remove the "prepare" script from your package.json\n`;
48+
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
49+
const message =
50+
pkg.scripts.prepare === 'svelte-kit sync'
51+
? `\`svelte-kit sync\` now runs on "postinstall" — please remove the "prepare" script from your package.json\n`
52+
: `\`svelte-kit sync\` now runs on "postinstall" — please remove it from your "prepare" script\n`;
53+
4954
console.error(colors.bold().red(message));
5055
return;
5156
}

0 commit comments

Comments
 (0)