Skip to content

Commit

Permalink
fix: use portable path manipulation for choosing package names
Browse files Browse the repository at this point in the history
This *should* fix the generated names of packages on windows, which currently take the form `C:\kdfjslfj\jkfsjldkfjsf\sjdkfldjf` (this was reported to me by someone attempting to generate yaegi symbols for one of my projects). That being said, I don't have a windows machine to test on.
  • Loading branch information
whereswaldon authored Feb 17, 2021
1 parent 8bb5daf commit eb06aee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/yaegi/extract.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"fmt"
"io"
"os"
"path"
"path/filepath"
"strings"

"github.com/traefik/yaegi/extract"
Expand Down Expand Up @@ -50,7 +50,7 @@ func extractCmd(arg []string) error {
}

if name == "" {
name = path.Base(wd)
name = filepath.Base(wd)
}
ext := extract.Extractor{
Dest: name,
Expand Down

0 comments on commit eb06aee

Please sign in to comment.