Skip to content

Commit

Permalink
feat(baremetal): Add more details to error messages (#10527)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobbe authored Apr 29, 2024
1 parent 39b385c commit 05e96ba
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
10 changes: 10 additions & 0 deletions .changesets/10527.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
- feat(baremetal): Add more details to error messages (#10527) by @Tobbe

Now when an ssh command execution fails the error message will additionally
include the directory it was executed in and the full stderr message

## Before
![image](https://github.com/redwoodjs/redwood/assets/30793/bda480ee-7c26-40c8-9128-42a830574a53)

## After
![image](https://github.com/redwoodjs/redwood/assets/30793/85080fa8-be2f-4638-9af1-0ba4c79057e3)
3 changes: 2 additions & 1 deletion packages/cli/src/commands/deploy/baremetal/SshExecutor.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ export class SshExecutor {

if (result.code !== 0) {
const error = new Error(
`Error while running command \`${command} ${args.join(' ')}\``,
`Error while running command \`${command} ${args.join(' ')}\` in ${path}\n` +
result.stderr,
)
error.exitCode = result.code
throw error
Expand Down

0 comments on commit 05e96ba

Please sign in to comment.