Skip to content

Commit

Permalink
Merge pull request #692 from A-Walrus/main
Browse files Browse the repository at this point in the history
Improve --parameters usability
  • Loading branch information
hannobraun authored Jun 13, 2022
2 parents fcbcb5f + e2d59c3 commit 7a0f848
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ The file type is based on the supplied extension. Both 3MF and STL are supported
Some models have parameters that can be overridden. For example, to override the inner and outer radii of the spacer model:

``` sh
cargo run -- -m spacer --parameters outer=8.0 --parameters inner=5.0
cargo run -- -m spacer --parameters "outer=8.0,inner=5.0"
```


Expand Down
2 changes: 2 additions & 0 deletions crates/fj-app/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,12 @@ fn parse_parameters(input: &str) -> anyhow::Result<Parameters> {
let key = parameter
.next()
.ok_or_else(|| anyhow!("Expected model parameter key"))?
.trim()
.to_owned();
let value = parameter
.next()
.ok_or_else(|| anyhow!("Expected model parameter value"))?
.trim()
.to_owned();

parameters.0.insert(key, value);
Expand Down

0 comments on commit 7a0f848

Please sign in to comment.