Skip to content

Commit

Permalink
fix: revert #228 (#244)
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianGonz97 authored Oct 28, 2024
1 parent 87c4352 commit 163557f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/sixty-sloths-kneel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'sv': patch
---

fix: revert logging dependency install errors
5 changes: 1 addition & 4 deletions packages/cli/commands/add/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -545,10 +545,7 @@ async function runAdders({
if (workspace.packageManager === 'npm') args.unshift('--yes');

try {
const { stderr } = await exec(command, args, {
nodeOptions: { cwd: workspace.cwd, stdio: script.stdio }
});
if (stderr) throw new Error(stderr);
await exec(command, args, { nodeOptions: { cwd: workspace.cwd, stdio: script.stdio } });
} catch (error) {
const typedError = error as Error;
throw new Error(
Expand Down
3 changes: 1 addition & 2 deletions packages/cli/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ export async function installDependencies(agent: AgentName, cwd: string) {
spinner.start('Installing dependencies...');
try {
const { command, args } = constructCommand(COMMANDS[agent].install, [])!;
const { stderr } = await exec(command, args, { nodeOptions: { cwd } });
if (stderr) throw new Error(stderr);
await exec(command, args, { nodeOptions: { cwd } });

spinner.stop('Successfully installed dependencies');
} catch (error) {
Expand Down

0 comments on commit 163557f

Please sign in to comment.