Skip to content

Commit

Permalink
Allow hyphen char in workspace name
Browse files Browse the repository at this point in the history
Closes bazelbuild#11837.

Closes bazelbuild#11838.

PiperOrigin-RevId: 326286694
  • Loading branch information
davido authored and copybara-github committed Aug 12, 2020
1 parent 72e559d commit e574d55
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
/** A collection of global Starlark build API functions that apply to WORKSPACE files. */
public class WorkspaceGlobals implements WorkspaceGlobalsApi {

// Must start with a letter and can contain letters, numbers, and underscores
private static final Pattern LEGAL_WORKSPACE_NAME = Pattern.compile("^\\p{Alpha}\\w*$");
// Must start with a letter and can contain letters, numbers, underscores and hyphens.
private static final Pattern LEGAL_WORKSPACE_NAME = Pattern.compile("^\\p{Alpha}[\\w-]*$");

private final boolean allowOverride;
private final RuleFactory ruleFactory;
Expand Down

0 comments on commit e574d55

Please sign in to comment.