From 300ead65d3b4fb5cb61ae650191307a8b2cd3305 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Sun, 9 Dec 2018 14:57:14 -0800 Subject: [PATCH] Error when deprecated --excludes command-line option is used. --- NEWS | 1 + borgmatic/commands/borgmatic.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/NEWS b/NEWS index 2b8a49d5..54cf6c6a 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ 1.2.12.dev0 * #111: Update Borg create --filter values so a dry run lists files to back up. * #113: Update README with link to a new/forked Docker image. + * Error when deprecated --excludes command-line option is used. 1.2.11 * #108: Support for Borg create --progress via borgmatic command-line flag. diff --git a/borgmatic/commands/borgmatic.py b/borgmatic/commands/borgmatic.py index d49c029b..78eef23f 100644 --- a/borgmatic/commands/borgmatic.py +++ b/borgmatic/commands/borgmatic.py @@ -110,6 +110,9 @@ def parse_arguments(*arguments): args = parser.parse_args(arguments) + if args.excludes_filename: + raise ValueError('The --excludes option has been replaced with exclude_patterns in configuration') + if args.progress and not args.create: raise ValueError('The --progress option can only be used with the --create option')