fix bugs
This commit is contained in:
@@ -89,17 +89,9 @@ func Generate(cfg *config.Config) GenerateResult {
|
||||
return result
|
||||
}
|
||||
|
||||
if cfg.VerticalSlices {
|
||||
if err := drive.UploadDir(cfg.OutputPath, remoteDir); err != nil {
|
||||
result.Error = fmt.Errorf("drive upload: %w", err)
|
||||
return result
|
||||
}
|
||||
} else {
|
||||
indexPath := filepath.Join(cfg.OutputPath, "index_"+repoName+".md")
|
||||
if err := drive.Upload(indexPath, remoteDir); err != nil {
|
||||
result.Error = fmt.Errorf("drive upload: %w", err)
|
||||
return result
|
||||
}
|
||||
if err := drive.UploadDir(cfg.OutputPath, remoteDir); err != nil {
|
||||
result.Error = fmt.Errorf("drive upload: %w", err)
|
||||
return result
|
||||
}
|
||||
result.Uploaded = true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user