mirror of
https://github.com/nushell/nushell.git
synced 2024-12-23 23:49:44 +01:00
nu-command/filesystem: fix rm .sock file (#5524)
This commit is contained in:
parent
53e35670ea
commit
32d1939a95
@ -301,7 +301,7 @@ fn rm(
|
||||
trash::delete(&f).map_err(|e: trash::Error| {
|
||||
Error::new(ErrorKind::Other, format!("{:?}", e))
|
||||
})
|
||||
} else if metadata.is_file() {
|
||||
} else if metadata.is_file() || is_socket || is_fifo {
|
||||
std::fs::remove_file(&f)
|
||||
} else {
|
||||
std::fs::remove_dir_all(&f)
|
||||
|
Loading…
Reference in New Issue
Block a user