mirror of
https://github.com/nushell/nushell
synced 2024-12-27 05:23:11 +00:00
Fix trash-support
feature flag (#4394)
Pass it through to be inclued with `--all-features` Make clippy without `--all-features` happy
This commit is contained in:
parent
12d4c2986c
commit
e1f98c1bfd
2 changed files with 3 additions and 0 deletions
|
@ -77,6 +77,7 @@ default = ["plugin", "inc", "example", "which"]
|
||||||
stable = ["default"]
|
stable = ["default"]
|
||||||
extra = [ "default", "dataframe", "gstat", "zip-support", "query", ]
|
extra = [ "default", "dataframe", "gstat", "zip-support", "query", ]
|
||||||
wasi = ["inc"]
|
wasi = ["inc"]
|
||||||
|
trash-support = ["nu-command/trash-support"]
|
||||||
|
|
||||||
# Stable (Default)
|
# Stable (Default)
|
||||||
inc = ["nu_plugin_inc"]
|
inc = ["nu_plugin_inc"]
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
#[cfg(feature = "trash-support")]
|
||||||
use std::io::ErrorKind;
|
use std::io::ErrorKind;
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
use std::os::unix::prelude::FileTypeExt;
|
use std::os::unix::prelude::FileTypeExt;
|
||||||
|
@ -73,6 +74,7 @@ fn rm(
|
||||||
call: &Call,
|
call: &Call,
|
||||||
) -> Result<PipelineData, ShellError> {
|
) -> Result<PipelineData, ShellError> {
|
||||||
let trash = call.has_flag("trash");
|
let trash = call.has_flag("trash");
|
||||||
|
#[cfg(feature = "trash-support")]
|
||||||
let permanent = call.has_flag("permanent");
|
let permanent = call.has_flag("permanent");
|
||||||
let recursive = call.has_flag("recursive");
|
let recursive = call.has_flag("recursive");
|
||||||
let force = call.has_flag("force");
|
let force = call.has_flag("force");
|
||||||
|
|
Loading…
Reference in a new issue