diff --git a/app/gitspace/orchestrator/ide/vscodeweb.go b/app/gitspace/orchestrator/ide/vscodeweb.go index 9a9ff4d98..b4fa14696 100644 --- a/app/gitspace/orchestrator/ide/vscodeweb.go +++ b/app/gitspace/orchestrator/ide/vscodeweb.go @@ -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)