mirror of
https://github.com/harness/drone.git
synced 2025-05-31 11:43:15 +00:00
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:
parent
74ff87178f
commit
6f7e203251
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user