Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mv: make 'UpdateMode' public for nushell #5427

Closed
dmatos2012 opened this issue Oct 19, 2023 · 1 comment · Fixed by #5428
Closed

mv: make 'UpdateMode' public for nushell #5427

dmatos2012 opened this issue Oct 19, 2023 · 1 comment · Fixed by #5428
Labels

Comments

@dmatos2012
Copy link
Contributor

Related to the work done on making some mv api public in pull #5335, there was UpdateMode missing from that as its still private and therefore cannot build Options {} for nushell.

The fix :

diff --git a/src/uu/mv/src/mv.rs b/src/uu/mv/src/mv.rs
index 9888389ae..02c856ce0 100644
--- a/src/uu/mv/src/mv.rs
+++ b/src/uu/mv/src/mv.rs
@@ -19,12 +19,12 @@ use std::os::unix;
 #[cfg(windows)]
 use std::os::windows;
 use std::path::{Path, PathBuf};
-pub use uucore::backup_control::BackupMode;
 use uucore::backup_control::{self, source_is_target_backup};
 use uucore::display::Quotable;
 use uucore::error::{set_exit_code, FromIo, UError, UResult, USimpleError, UUsageError};
 use uucore::fs::{are_hardlinks_or_one_way_symlink_to_same_file, are_hardlinks_to_same_file};
-use uucore::update_control::{self, UpdateMode};
+use uucore::update_control;
+pub use uucore::{backup_control::BackupMode, update_control::UpdateMode};
 use uucore::{format_usage, help_about, help_section, help_usage, prompt_yes, show};
 
 use fs_extra::dir::{

Right now I use that diff and it seems to work just fine from nushell, so the fix should be just fine I think :)

I could also make a PR with these tiny changes if its ok so that nushell can use them

@cakebaker
Copy link
Contributor

Yes, make a PR, please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants