Skip to content

Commit

Permalink
This works on Windows too! (#2197)
Browse files Browse the repository at this point in the history
  • Loading branch information
frederikhors committed May 24, 2022
1 parent f6aeed6 commit 656045d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions codegen/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package codegen
import (
"fmt"
"os"
"path"
"path/filepath"
"sort"
"strings"
Expand Down Expand Up @@ -178,7 +177,7 @@ func BuildData(cfg *config.Config) (*Data, error) {
return nil, fmt.Errorf("failed to get working directory: %w", err)
}
outputDir := cfg.Exec.Dir()
sourcePath := path.Join(wd, s.Name)
sourcePath := filepath.Join(wd, s.Name)
relative, err := filepath.Rel(outputDir, sourcePath)
if err != nil {
return nil, fmt.Errorf("failed to compute path of %s relative to %s: %w"+sourcePath, outputDir, err)
Expand Down

0 comments on commit 656045d

Please sign in to comment.