Move sudo runner configuration to .cargo/config.toml (#155)

This simplifies common usage.
pull/160/head
Ez-FlawLess 3 weeks ago committed by GitHub
parent c8970881ef
commit b61f19a54d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,2 @@
[target."cfg(all())"]
runner = "sudo -E"

@ -14,7 +14,7 @@
Use `cargo build`, `cargo check`, etc. as normal. Run your program with: Use `cargo build`, `cargo check`, etc. as normal. Run your program with:
```shell ```shell
cargo run --release --config 'target."cfg(all())".runner="sudo -E"' cargo run --release
``` ```
Cargo build scripts are used to automatically build the eBPF correctly and include it in the Cargo build scripts are used to automatically build the eBPF correctly and include it in the

@ -102,7 +102,7 @@ case $OS in
expect <<EOF expect <<EOF
set timeout 30 ;# Increase timeout if necessary set timeout 30 ;# Increase timeout if necessary
spawn cargo run --release --config "target.\"cfg(all())\".runner=\"sudo -E\"" spawn cargo run --release
expect { expect {
-re "Waiting for Ctrl-C.*" { -re "Waiting for Ctrl-C.*" {
send -- \003 ;# Send Ctrl-C send -- \003 ;# Send Ctrl-C

Loading…
Cancel
Save