Benign crates 1,080,824 installs Download

devx-pre-commit 0.1.0

“Utilities for creating git pre-commit hooks useful in rust projects”

Reads a file into a Rust stringReads a Rust environment variable
SHA-256cfe6b96e5b41c04ee93d3b18d28ff63b4e692583732c5baa53d2975e3620e259
MaleculeH₂(F₂Os)

Evidence

Reads a file into a Rust string lines 156–163
156:50… t.join(it).join("Cargo.toml");
157 let cargo_toml = fs::read_to_string(&cargo_toml).ok()?;
158 Self::parse_crate_name(&cargo_toml)
159 })
⋯4 lines
Reads a Rust environment variable lines 186–195
186:27… is_empty() {
187 return Ok(());
188 }
189
190 cmd!(std::env::var("CARGO")
191 .as_ref()
192 .map(Deref::deref)
193 .unwrap_or("cargo"))
194 .arg("fmt")
195 .arg( …
Rust fs copy call lines 225–234
225:24… (consts::EXE_EXTENSION);
226
227 let me = env::current_exe()?;
228 fs::copy(me, hook_path)?;
229
230 Ok(())
⋯4 lines
Rust reads an environment variable lines 244–249
244:77… es.html
245pub fn locate_project_root() -> Result<PathBuf> {
246 Ok(env::var("GIT_DIR").map(Into::into).or_else(|_| {
247 cmd!("git", "rev-parse", "--show-toplevel")
248 .echo_cmd(false)
249 …

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.