nushell/crates/nu-completion/Cargo.toml
Bruce Mitchener 1943071d12
Simplify is_executable in nu-completion. (#3742)
On Windows, we used the `is-exeuctable` crate but on Unix, we
duplicated the check that it did, with one difference: We also
looked at whether or not it was a symlink.

The `is-executable` crate uses `std::fs::metadata` which follows
symlinks, so this scenario should never occur here, as it will
return the metadata for the target file.

Using the `is-executable` crate on both Unix and Windows lets us
make it non-optional. This lets us remove the `executable-support`
feature. (It is worth noting that this code didn't compile on
Windows when the `executable-support` feature was not specified.)

Right now, there is an alternate code path for `target_arch` being
`wasm32`. This isn't exactly correct as it should probably handle
something different for when the `target_os` is `wasi`.
2021-07-07 07:53:07 -05:00

30 lines
845 B
TOML

[package]
authors = ["The Nu Project Contributors"]
description = "Completions for nushell"
edition = "2018"
license = "MIT"
name = "nu-completion"
version = "0.33.1"
[lib]
doctest = false
[dependencies]
nu-engine = { version="0.33.1", path="../nu-engine" }
nu-data = { version="0.33.1", path="../nu-data" }
nu-errors = { version="0.33.1", path="../nu-errors" }
nu-parser = { version="0.33.1", path="../nu-parser" }
nu-path = { version="0.33.1", path="../nu-path" }
nu-protocol = { version="0.33.1", path="../nu-protocol" }
nu-source = { version="0.33.1", path="../nu-source" }
nu-test-support = { version="0.33.1", path="../nu-test-support" }
dirs-next = "2.0.0"
indexmap = { version="1.6.1", features=["serde-1"] }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
is_executable = "1.0.1"
[dev-dependencies]
parking_lot = "0.11.1"