Skip to content

Commit

Permalink
fix: auto-trust on task add (jdx#3676)
Browse files Browse the repository at this point in the history
Fixes jdx#3669
  • Loading branch information
jdx authored and miguelmig committed Dec 21, 2024
1 parent d7b2bf0 commit 1458997
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions mise.lock
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ version = "0.9.3"
backend = "ubi:tamasfe/taplo[matching=full]"

[tools.taplo.checksums]
taplo-full-linux-x86_64 = "sha256:e89d2303ea9a5ec07971feec807fa493dc9ab6624c19b313ff90fdede247ee08"
taplo-full-macos-aarch64 = "sha256:cf55aa3e4c9b631c1fbb3f8a4adac59ca2ecc7898d26e749cd9b62d5ed858fce"

[tools.wait-for-gh-rate-limit]
Expand Down
4 changes: 3 additions & 1 deletion src/cli/tasks/add.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use crate::config::config_file;
use crate::task::Task;
use crate::{config, file};
use eyre::Result;
Expand Down Expand Up @@ -203,7 +204,8 @@ impl TasksAdd {
task.insert("run", shell_words::join(&self.run).into());
}
tasks.insert(&self.task, Item::Table(task));
file::write(path, doc.to_string())?;
file::write(&path, doc.to_string())?;
config_file::trust(&config_file::config_trust_root(&path))?;
}

Ok(())
Expand Down

0 comments on commit 1458997

Please sign in to comment.