mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
- Switch to scientific crate. Large values are printed in scientific notations. Regular values are printed as u64, i64 or f64. - Skip copying commit hooks in git worktrees - urlquery.decode, urlquery.encode, urlquery.encode_object - substring, indexof_n string builtins - Make sprintf more OPA conformant Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
16 lines
490 B
Rust
16 lines
490 B
Rust
// Copyright (c) Microsoft Corporation.
|
|
// Licensed under the MIT License.
|
|
|
|
use anyhow::Result;
|
|
use std::path::Path;
|
|
|
|
fn main() -> Result<()> {
|
|
// Copy hooks to appropriate location so that git will run them.
|
|
// In git worktrees, .git is a symlink and the following commands fail.
|
|
if Path::new(".git").is_dir() {
|
|
std::fs::copy("./scripts/pre-commit", "./.git/hooks/pre-commit")?;
|
|
std::fs::copy("./scripts/pre-push", "./.git/hooks/pre-push")?;
|
|
}
|
|
Ok(())
|
|
}
|