Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Commit

Permalink
Fix internal package import (#1535)
Browse files Browse the repository at this point in the history
* Fix internal package import

* Fix for windows

* travis ci use golang 1.10.x
  • Loading branch information
uudashr authored and ramya-rao-a committed Feb 28, 2018
1 parent 230e7bc commit 41c5b3b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go:
- 1.7.x
- 1.8.x
- 1.9.x
- '1.10'
- 1.10.x
- tip

sudo: false
Expand Down
2 changes: 1 addition & 1 deletion src/goPackages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ export function isAllowToImportPackage(toDirPath: string, currentWorkspace: stri
let internalPkgFound = pkgPath.match(/\/internal\/|\/internal$/);
if (internalPkgFound) {
let rootProjectForInternalPkg = path.join(currentWorkspace, pkgPath.substr(0, internalPkgFound.index));
return toDirPath.startsWith(rootProjectForInternalPkg);
return toDirPath.startsWith(rootProjectForInternalPkg + path.sep) || toDirPath === rootProjectForInternalPkg;
}
return true;
}

0 comments on commit 41c5b3b

Please sign in to comment.