Commit 0fb3841
authored
fix: parse native_bindings as boolean flag (#291)
The `native_bindings` argument in the `GenerateAllArgs` struct is
defined as a positional argument while using `action = SetTrue`
internally via `clap`.
This leads to a panic at runtime with commands such as:
`CARGO_FEATURE_NO_NEON=1 ubrn build ios --config ubrn.yaml
--native-bindings --release`
with the message:
```
thread 'main' panicked at /Users/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/clap_builder-4.5.42/src/builder/debug_asserts.rs:732:9:
Argument 'native_bindings' is positional and it must take a value but action is SetTrue
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Error: Process completed with exit code 1.
```
[Link to full
log](https://github.com/unomed-dev/react-native-matrix-sdk/actions/runs/16651743903/job/47126062347)
### Changes
This PR updates the `native_bindings` field in `generate.rs` to:
```rust
#[clap(long, default_value = "false")]
native_bindings: bool
```
declaring it as a proper optional boolean flag (`--native-bindings`) and
setting its default value to `false`.1 parent c758c23 commit 0fb3841
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| 101 | + | |
101 | 102 | | |
102 | 103 | | |
103 | 104 | | |
| |||
0 commit comments