Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ use crate::{
append::AppendCommand, bugreport::BugReportCommand, compat::CompatCommand,
complete::CompleteCommand, concat::ConcatCommand, core::Umask, create::CreateCommand,
delete::DeleteCommand, experimental::ExperimentalCommand, extract::ExtractCommand,
list::ListCommand, sort::SortCommand, split::SplitCommand, strip::StripCommand,
xattr::XattrCommand,
list::ListCommand, migrate::MigrateCommand, sort::SortCommand, split::SplitCommand,
strip::StripCommand, xattr::XattrCommand,
},
utils::{fs::current_umask, process::is_running_as_root},
};
Expand Down Expand Up @@ -195,6 +195,8 @@ pub(crate) enum Commands {
Strip(StripCommand),
#[command(about = "Sort entries in archive")]
Sort(SortCommand),
#[command(about = "Upgrade archives created by older PNA versions")]
Migrate(MigrateCommand),
#[command(about = "Manipulate extended attributes")]
Xattr(XattrCommand),
#[command(about = "Generate shell auto complete")]
Expand Down
3 changes: 2 additions & 1 deletion cli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub mod diff;
pub(super) mod experimental;
pub mod extract;
pub mod list;
mod migrate;
pub mod migrate;
pub mod sort;
pub mod split;
pub(crate) mod strip;
Expand Down Expand Up @@ -74,6 +74,7 @@ impl Cli {
Commands::Concat(cmd) => cmd.execute(ctx),
Commands::Strip(cmd) => cmd.execute(ctx),
Commands::Sort(cmd) => cmd.execute(ctx),
Commands::Migrate(cmd) => cmd.execute(ctx),
Commands::Xattr(cmd) => cmd.execute(ctx),
Commands::Complete(cmd) => cmd.execute(ctx),
Commands::BugReport(cmd) => cmd.execute(ctx),
Expand Down
16 changes: 14 additions & 2 deletions cli/src/command/experimental.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,17 @@ impl Command for ExperimentalCommand {
ExperimentalCommands::Chown(cmd) => cmd.execute(ctx),
ExperimentalCommands::Chmod(cmd) => cmd.execute(ctx),
ExperimentalCommands::Acl(cmd) => cmd.execute(ctx),
ExperimentalCommands::Migrate(cmd) => cmd.execute(ctx),
ExperimentalCommands::Migrate(cmd) => {
log::warn!(
"`{0} experimental migrate` subcommand was stabilized, use `{0} migrate` instead. this command will be removed in the future.",
std::env::current_exe()
.ok()
.and_then(|it| it.file_name().map(|n| n.to_os_string()))
.unwrap_or_default()
.to_string_lossy()
);
Comment thread
ChanTsune marked this conversation as resolved.
cmd.execute(ctx)
}
ExperimentalCommands::Chunk(cmd) => cmd.execute(ctx),
ExperimentalCommands::Sort(cmd) => {
log::warn!(
Expand Down Expand Up @@ -75,7 +85,9 @@ pub(crate) enum ExperimentalCommands {
Chmod(command::chmod::ChmodCommand),
#[command(about = "Manipulate ACLs of entries")]
Acl(command::acl::AclCommand),
#[command(about = "Migrate old format to latest format")]
#[command(
about = "Upgrade archives created by older PNA versions (stabilized, use `pna migrate` command instead. this command will be removed in the future)"
)]
Comment thread
ChanTsune marked this conversation as resolved.
Migrate(command::migrate::MigrateCommand),
#[command(about = "Chunk level operation")]
Chunk(command::chunk::ChunkCommand),
Expand Down
Loading