We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d721c65 commit 5945ea8Copy full SHA for 5945ea8
.changeset/tall-moons-marry.md
@@ -0,0 +1,5 @@
1
+---
2
+'sv': patch
3
4
+
5
+fix: package manager detection in non interactive environments
packages/cli/utils/package-manager.ts
@@ -22,6 +22,10 @@ export async function packageManagerPrompt(cwd: string): Promise<AgentName | und
22
const detected = await detect({ cwd });
23
const agent = detected?.name ?? getUserAgent();
24
25
+ // If we are in a non interactive environment just go with the detected package manager.
26
+ // There is no need to prompt in that case.
27
+ if (!process.stdout.isTTY) return agent;
28
29
const pm = await p.select({
30
message: 'Which package manager do you want to install dependencies with?',
31
options: agentOptions,
0 commit comments