Skip to content

Commit

Permalink
allow - in package name
Browse files Browse the repository at this point in the history
Fixes reading from local package if it contains a hyphen
  • Loading branch information
WebFreak001 authored Oct 15, 2022
1 parent 66c5e63 commit 2a30afd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/commands/main.d
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ string loadCurrentProjectName()
{
import std.regex : ctRegex, matchFirst;

enum pattern = ctRegex!"^name \"(\\w+)\"$";
enum pattern = ctRegex!`^name "([-\w]+)"$`;
auto f = File("dub.sdl", "r");
foreach (line; f.byLine())
{
Expand Down

0 comments on commit 2a30afd

Please sign in to comment.