Passing the relative path to working directory to DownloadStarterProjectAsDir
causes error
#892
Labels
DownloadStarterProjectAsDir
causes error
#892
/kind bug
Which area this bug is related to?
/area registry
What versions of software are you using?
Operating System: Linux
Go Pkg Version: 1.18
Bug Summary
Describe the bug:
Invoking
DownloadStarterProjectAsDir
from the registry library api with the destination directory set to.
causes the SlipZip check for extracting the starter project to error incorrectly. This is due tofilepath.Join("./", filename)
resulting in no prefix where the check expects./
as the prefix.To Reproduce:
Expected behavior
Any logs, error output, screenshots etc? Provide the devfile that sees this bug, if applicable.
Additional context
Any workaround?
Use absolute path instead of relative path when specifying the working directory. E.g. If Shell, use
$PWD
instead of.
. If Go, useos.Getwd()
instead of"."
.Suggestion on how to fix the bug
Correct the if statement on this line to:
Target Date: 07-21-2022
The text was updated successfully, but these errors were encountered: