mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
OPA conformance (#81)
- 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>
This commit is contained in:
committed by
GitHub
parent
e549882b07
commit
84bedda1c6
@@ -2,10 +2,14 @@
|
||||
// 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.
|
||||
std::fs::copy("./scripts/pre-commit", "./.git/hooks/pre-commit")?;
|
||||
std::fs::copy("./scripts/pre-push", "./.git/hooks/pre-push")?;
|
||||
// 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(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user