Skip to content

Commit 432418a

Browse files
authored
Make target not found error visible (#6208)
1 parent f25ab85 commit 432418a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/project/run.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import (
1818

1919
"github.com/pulumi/pulumi/sdk/v3/go/auto/events"
2020
"github.com/pulumi/pulumi/sdk/v3/go/common/apitype"
21+
"github.com/sst/sst/v3/internal/util"
2122
"github.com/sst/sst/v3/pkg/bus"
2223
"github.com/sst/sst/v3/pkg/flag"
2324
"github.com/sst/sst/v3/pkg/global"
@@ -327,7 +328,7 @@ func (p *Project) RunNext(ctx context.Context, input *StackInput) error {
327328
return res.URN.Name() == item
328329
})
329330
if index == -1 {
330-
return fmt.Errorf("Target not found: %v", item)
331+
return util.NewReadableError(nil, fmt.Sprintf("Target not found: %v", item))
331332
}
332333
args = append(args, "--target", string(completed.Resources[index].URN))
333334
}

0 commit comments

Comments
 (0)