summaryrefslogtreecommitdiff
path: root/src/resource.rs
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2021-01-10 10:05:44 +0000
committerDaniel Silverstone <dsilvers@digital-scurf.org>2021-01-10 10:05:44 +0000
commitd373be7f55233e5802840a804bf50f3f9a717252 (patch)
treeeb8193dc50e65786673316dbb0812307ec18329d /src/resource.rs
parentfcdbd77cc2b909b8a1d0fc8d2e6343bbc278470c (diff)
downloadsubplot-d373be7f55233e5802840a804bf50f3f9a717252.tar.gz
resource: Support more than one --resource on the CLI
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'src/resource.rs')
-rw-r--r--src/resource.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/resource.rs b/src/resource.rs
index 48c8cc5..3d65c68 100644
--- a/src/resource.rs
+++ b/src/resource.rs
@@ -18,16 +18,17 @@ use structopt::StructOpt;
pub struct ResourceOpts {
#[structopt(
long,
+ number_of_values = 1,
help = "Look for code templates and other resources in DIR",
name = "DIR"
)]
- resources: Option<PathBuf>,
+ resources: Vec<PathBuf>,
}
impl ResourceOpts {
/// Handle any supplied resource related arguments
pub fn handle(&self) {
- if let Some(rpath) = self.resources.as_ref() {
+ for rpath in &self.resources {
add_search_path(rpath);
}
}