Skip to content

Commit

Permalink
Windows Fixes (bazel-contrib#245)
Browse files Browse the repository at this point in the history
Fix fileinfo.go to handle Windows paths.
Pass skylark files as strings.
  • Loading branch information
pmuetschard authored and jayconrod committed Jun 27, 2018
1 parent a871ca8 commit 4477b10
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions internal/go_repository.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ def _go_repository_tools_impl(ctx):
ctx.symlink(ctx.path(root_file).dirname, "src/" + prefix)

env = {
"GOROOT": go_root,
"GOPATH": ctx.path("."),
"GOROOT": str(go_root),
"GOPATH": str(ctx.path(".")),
# workaround: to find gcc for go link tool on Arm platform
"PATH": ctx.os.environ["PATH"],
}
Expand Down
2 changes: 1 addition & 1 deletion internal/language/go/fileinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ const (
// fileNameInfo returns information that can be inferred from the name of
// a file. It does not read data from the file.
func fileNameInfo(path_ string) fileInfo {
name := path.Base(path_)
name := filepath.Base(path_)
var ext ext
switch path.Ext(name) {
case ".go":
Expand Down

0 comments on commit 4477b10

Please sign in to comment.