1
0
mirror of https://github.com/sharkdp/bat.git synced 2026-02-08 08:42:08 +00:00

Fix for Windows: do not run binaries from CWD

This fixes a bug on Windows where `Command::new` would also run
executables from the current working directory, possibly resulting in
accidental runs of programs called `less`.
This commit is contained in:
David Peter
2021-07-12 20:03:31 +02:00
committed by David Peter
parent 3617c98cf5
commit bf2b2df9c9
4 changed files with 41 additions and 2 deletions

29
Cargo.lock generated
View File

@@ -1,5 +1,7 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "adler"
version = "1.0.2"
@@ -97,6 +99,7 @@ dependencies = [
"error-chain",
"git2",
"globset",
"grep-cli",
"lazy_static",
"nix",
"path_abs",
@@ -487,6 +490,23 @@ dependencies = [
"regex",
]
[[package]]
name = "grep-cli"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2dd110c34bb4460d0de5062413b773e385cbf8a85a63fc535590110a09e79e8a"
dependencies = [
"atty",
"bstr",
"globset",
"lazy_static",
"log",
"regex",
"same-file",
"termcolor",
"winapi-util",
]
[[package]]
name = "hashbrown"
version = "0.9.1"
@@ -1143,6 +1163,15 @@ dependencies = [
"winapi",
]
[[package]]
name = "termcolor"
version = "1.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4"
dependencies = [
"winapi-util",
]
[[package]]
name = "terminal_size"
version = "0.1.16"