fix: [CDE-540]: Adding check for media folder path during gitspace creation. (#3100)

* fix: [CDE-540]: Adding check for media folder path during gitspace creation.
This commit is contained in:
Dhruv Dhruv 2024-12-03 08:59:31 +00:00 committed by Harness
parent 74ff87178f
commit 6f7e203251

View File

@ -106,6 +106,10 @@ func (v *VSCodeWeb) updateMediaContent(ctx context.Context, exec *devcontainer.E
}
mediaFolderPath := path[startIndex+len(startMarker) : endIndex]
if len(mediaFolderPath) == 0 {
return fmt.Errorf("media folder path should not be empty, VSCode web is not installed")
}
err = v.copyMediaToContainer(ctx, exec, mediaFolderPath)
if err != nil {
return fmt.Errorf("failed to copy media folder to container at path %s: %w", mediaFolderPath, err)