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

Commit

Permalink
Support adding packages with BUILD.bazel filenames
Browse files Browse the repository at this point in the history
[BUILD.bazel](https://github.com/bazelbuild/bazel/blob/master/src/main
/java/com/google/devtools/build/lib/skyframe/PackageLookupValue.java#L
55) is a valid BuildFilename (see 
bazelbuild/bazel#552), so it must be 
selectable when adding packages in Tulsi.

--
Change-Id: Ieb2c0c1dd78fd99c1bd98b0567e60658f8dce593
Reviewed-on: #2
PiperOrigin-RevId: 146696005
MOS_MIGRATED_REVID=146696005
  • Loading branch information
Adam Price authored and kelvinchan-google committed Feb 7, 2017
1 parent 3e84098 commit 9916ca7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Tulsi/ProjectEditorPackageManagerViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ final class ProjectEditorPackageManagerViewController: NSViewController, NewProj
if let isDir = isDir as? NSNumber, isPackage = isPackage as? NSNumber
where !isPackage.boolValue {
if isDir.boolValue { return true }
if let filename = url.lastPathComponent where filename == "BUILD" {
if let filename = url.lastPathComponent where (filename == "BUILD" || filename == "BUILD.bazel") {
// Prevent anything outside of the selected workspace.
return url.path!.hasPrefix(workspacePath) && !document.containsBUILDFileURL(url)
}
Expand Down

0 comments on commit 9916ca7

Please sign in to comment.