Skip to content

Commit 3209e49

Browse files
authored
Send back relative path in download (#2460)
* Currently the absolute path is assigned to the requirements file in the config * This will then merge with the project directory making the file path invalid * Instead, send back the relative path from the project directory
1 parent 097da31 commit 3209e49

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pkg/procedure/validate.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ func validateRequirements(projectDir string, client *http.Client, cfg *config.Co
119119
}
120120

121121
if cfg.Build.PythonRequirements != "" {
122-
pipelineRequirements, err := requirements.ReadRequirements(requirementsFilePath)
122+
pipelineRequirements, err := requirements.ReadRequirements(filepath.Join(projectDir, requirementsFilePath))
123123
if err != nil {
124124
return err
125125
}
@@ -235,6 +235,11 @@ func downloadRequirements(projectDir string, client *http.Client) (string, error
235235
}
236236
}
237237

238+
requirementsFilePath, err = filepath.Rel(projectDir, requirementsFilePath)
239+
if err != nil {
240+
return "", err
241+
}
242+
238243
return requirementsFilePath, nil
239244
}
240245

0 commit comments

Comments
 (0)