Skip to content

Commit 811dd64

Browse files
committed
fix: fix type errors
1 parent ef33c30 commit 811dd64

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

pkg/cmd/build.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ func pullBuildOutputs(ctx context.Context, client stainlessv0.Client, res stainl
443443
au.BrightCyan("✱"), i+1, len(targets), au.Bold(target), au.Cyan(targetDir))
444444

445445
// Get the output details
446-
outputRes, err := client.BuildTargetOutputs.Get(
446+
outputRes, err := client.Builds.TargetOutputs.Get(
447447
ctx,
448448
stainlessv0.BuildTargetOutputGetParams{
449449
BuildID: res.ID,

pkg/cmd/buildtargetoutput.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,12 @@ func handleBuildsTargetOutputsRetrieve(ctx context.Context, cmd *cli.Command) er
6767
fmt.Printf("%s\n", colorizeJSON(res.RawJSON(), os.Stdout))
6868

6969
if cmd.Bool("pull") {
70-
targetDir := fmt.Sprintf("%s-%s", "tmp", "target")
71-
return pullOutput(res.Output, res.URL, res.Ref, targetDir, "target")
70+
build, err := cc.client.Builds.Get(ctx, cmd.String("build-id"))
71+
if err != nil {
72+
return err
73+
}
74+
targetDir := fmt.Sprintf("%s-%s", build.Project, cmd.String("target"))
75+
return pullOutput(res.Output, res.URL, res.Ref, targetDir)
7276
}
7377
return nil
7478
}

0 commit comments

Comments
 (0)