diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2021-01-10 10:05:44 +0000 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2021-01-10 10:05:44 +0000 |
commit | d373be7f55233e5802840a804bf50f3f9a717252 (patch) | |
tree | eb8193dc50e65786673316dbb0812307ec18329d /src/resource.rs | |
parent | fcdbd77cc2b909b8a1d0fc8d2e6343bbc278470c (diff) | |
download | subplot-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.rs | 5 |
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); } } |