Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

[WIP] Skip failed remove package vendor #1089

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion internal/gps/strip_vendor.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
package gps

import (
"fmt"
"os"
"path/filepath"
)
Expand All @@ -33,7 +34,7 @@ func stripVendor(path string, info os.FileInfo, err error) error {

if info.IsDir() {
if err := os.RemoveAll(path); err != nil {
return err
fmt.Printf("removing %s failed: %s, skipping. Please check manually\n", path, err)
}
return filepath.SkipDir
}
Expand Down
3 changes: 2 additions & 1 deletion internal/gps/strip_vendor_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
package gps

import (
"fmt"
"os"
"path/filepath"
)
Expand Down Expand Up @@ -41,7 +42,7 @@ func stripVendor(path string, info os.FileInfo, err error) error {

case dir:
if err := os.RemoveAll(path); err != nil {
return err
fmt.Printf("removing %s failed: %s, skipping. Please check manually\n", path, err)
}
return filepath.SkipDir
}
Expand Down