diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-08 21:44:00 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-08 21:44:00 -0500 |
commit | ecc61543b5212526338c4c5bc362936add3e34f3 (patch) | |
tree | 30210a527d85ce00c1e8f9dfab6ab713cf1a5fc6 /hscript | |
parent | decc6e87d9ab84aac5a000937d7e19f2fcefd911 (diff) | |
download | horizon-ecc61543b5212526338c4c5bc362936add3e34f3.tar.gz horizon-ecc61543b5212526338c4c5bc362936add3e34f3.tar.bz2 horizon-ecc61543b5212526338c4c5bc362936add3e34f3.tar.xz horizon-ecc61543b5212526338c4c5bc362936add3e34f3.zip |
hscript: Handle pkgs with + char and add test (thanks @sroracle)
Diffstat (limited to 'hscript')
-rw-r--r-- | hscript/meta.cc | 2 | ||||
-rw-r--r-- | hscript/script.cc | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/hscript/meta.cc b/hscript/meta.cc index 48125dc..1087ac5 100644 --- a/hscript/meta.cc +++ b/hscript/meta.cc @@ -42,7 +42,7 @@ bool Hostname::execute() const { Key *PkgInstall::parseFromData(const std::string data, int lineno, int *errors, int *warnings) { - std::regex valid_pkg("[0-9A-Za-z_.-]*((>?<|[<>]?=|[~>])[0-9A-Za-z-_.]+)?"); + std::regex valid_pkg("[0-9A-Za-z+_.-]*((>?<|[<>]?=|[~>])[0-9A-Za-z-_.]+)?"); std::string next_pkg; std::istringstream stream(data); std::set<std::string> all_pkgs; diff --git a/hscript/script.cc b/hscript/script.cc index 2d93a51..69afb30 100644 --- a/hscript/script.cc +++ b/hscript/script.cc @@ -126,6 +126,7 @@ struct Script::ScriptPrivate { output_warning("installfile:" + std::to_string(lineno), "package '" + pkg + "' has already been specified", "", opts.test(Pretty)); + continue; } packages.insert(pkg); } |