Skip to content

Commit 9a93cc7

Browse files
authored
fix: gcp plan retrieval (#238)
* gcp plan retrieval
1 parent a5390f3 commit 9a93cc7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pkg/utils/plan_storage.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"net/http"
88
"net/url"
99
"os"
10+
"path/filepath"
1011
"strconv"
1112

1213
"cloud.google.com/go/storage"
@@ -72,8 +73,11 @@ func (psg *PlanStorageGcp) RetrievePlan(localPlanFilePath string, storedPlanFile
7273
if _, err = io.Copy(file, rc); err != nil {
7374
return nil, fmt.Errorf("unable to write data to file: %v", err)
7475
}
75-
76-
return &localPlanFilePath, nil
76+
fileName, err := filepath.Abs(file.Name())
77+
if err != nil {
78+
return nil, fmt.Errorf("unable to get absolute path for file: %v", err)
79+
}
80+
return &fileName, nil
7781
}
7882

7983
func (psg *PlanStorageGcp) DeleteStoredPlan(storedPlanFilePath string) error {

0 commit comments

Comments
 (0)