diff --git a/NEWS b/NEWS index 17560d7e..ac555822 100644 --- a/NEWS +++ b/NEWS @@ -18,7 +18,7 @@ --editable" development installs. * #691: Fix error in "borgmatic restore" action when the configured repository path is relative instead of absolute. - * Run "borgmatic borg" action without capturing output so interactive prompts and flags like + * #694: Run "borgmatic borg" action without capturing output so interactive prompts and flags like "--progress" still work. 1.7.12 diff --git a/borgmatic/borg/borg.py b/borgmatic/borg/borg.py index 1c41b8ec..82fecc1a 100644 --- a/borgmatic/borg/borg.py +++ b/borgmatic/borg/borg.py @@ -1,5 +1,6 @@ import logging +import borgmatic.commands.arguments import borgmatic.logger from borgmatic.borg import environment, flags from borgmatic.execute import DO_NOT_CAPTURE, execute_command @@ -36,6 +37,14 @@ def run_arbitrary_borg( command_options_start_index = 2 if options[0] in BORG_SUBCOMMANDS_WITH_SUBCOMMANDS else 1 borg_command = tuple(options[:command_options_start_index]) command_options = tuple(options[command_options_start_index:]) + + if ( + borg_command + and borg_command[0] in borgmatic.commands.arguments.SUBPARSER_ALIASES.keys() + ): + logger.warning( + f"Borg's {borg_command[0]} subcommand is supported natively by borgmatic. Try this instead: borgmatic {borg_command[0]}" + ) except IndexError: borg_command = () command_options = ()