Skip to content

Commit

Permalink
fix: nft exec
Browse files Browse the repository at this point in the history
  • Loading branch information
ktmlm committed Oct 10, 2020
1 parent cad5b4b commit 9134eef
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/src/linux/nat/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,9 @@ pub(crate) mod real {
// 执行 nft 命令
#[inline(always)]
fn nft_exec(arg: &str) -> Result<()> {
let arg = format!("nft '{}'", arg);
let res = process::Command::new("sh")
.args(&["-c", arg])
.args(&["-c", &arg])
.output()
.c(d!())?;
if res.status.success() {
Expand Down

0 comments on commit 9134eef

Please sign in to comment.