mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
Merge pull request #1872 from mroutis/fix-1853
dvc: deprecate --remove-outs
This commit is contained in:
+1
-1
@@ -175,7 +175,7 @@ def add_parser(subparsers, parent_parser):
|
||||
"--remove-outs",
|
||||
action="store_true",
|
||||
default=False,
|
||||
help="Remove outputs before running the command.",
|
||||
help="Deprecated, this is now the default behavior",
|
||||
)
|
||||
run_parser.add_argument(
|
||||
"--no-commit",
|
||||
|
||||
@@ -471,6 +471,11 @@ class Stage(object):
|
||||
|
||||
# NOTE: remove outs before we check build cache
|
||||
if remove_outs:
|
||||
logger.warning(
|
||||
"--remove-outs is deprecated."
|
||||
" It is now the default behavior,"
|
||||
" so there's no need to use this option anymore."
|
||||
)
|
||||
stage.remove_outs(ignore_remove=False)
|
||||
logger.warning("Build cache is ignored when using --remove-outs.")
|
||||
ignore_build_cache = True
|
||||
|
||||
@@ -88,7 +88,6 @@ _dvc_run=(
|
||||
"--no-exec[Only create stage file without actually running it.]"
|
||||
"--overwrite-dvcfile[Overwrite existing dvc file without asking for confirmation.]"
|
||||
"--ignore-build-cache[Run this stage even if it has been already ran with the same command/dependencies/outputs/etc before.]"
|
||||
"--remove-outs[Remove outputs before running the command.]"
|
||||
"--no-commit[Don't put files/directories into cache.]"
|
||||
{-f,--file}"[Specify name of the stage file.]:File:_files"
|
||||
{-c,--cwd}"[Deprecated, use -w and -f instead.]:CWD:_files -/"
|
||||
|
||||
Reference in New Issue
Block a user