Skip to content

Commit

Permalink
better error parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
thdxr committed Mar 7, 2024
1 parent 6992305 commit 9ba44b0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/sst/ui/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ func parseError(input string) []string {
sections := strings.Split(input, "*")
for _, line := range sections[1:] {
line = strings.TrimSpace(line)
splits := regexp.MustCompile("[a-zA-Z]+:").Split(line, -1)
splits := regexp.MustCompile("[a-zA-Z]+:").Split(
strings.Split(line, "\n")[0],
-1,
)
final := strings.TrimSpace(splits[len(splits)-1])

for _, split := range strings.Split(final, "\n") {
Expand Down
1 change: 1 addition & 0 deletions examples/test/sst.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export default $config({
handler: "src/index.handler",
url: true,
});
const bucket = new aws.s3.Bucket("MyBucket", { bucket: "foo" });
return {
url: fn.url,
};
Expand Down

0 comments on commit 9ba44b0

Please sign in to comment.