From 2a30afdbb6fe8e8510b74efb9dd0811213ae34c6 Mon Sep 17 00:00:00 2001 From: Jan Jurzitza Date: Sat, 15 Oct 2022 20:11:16 +0200 Subject: [PATCH] allow `-` in package name Fixes reading from local package if it contains a hyphen --- source/commands/main.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/commands/main.d b/source/commands/main.d index c7e95e7..bdbb332 100644 --- a/source/commands/main.d +++ b/source/commands/main.d @@ -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()) {