summaryrefslogtreecommitdiff
path: root/compose/cli
diff options
context:
space:
mode:
authoraiordache <anca.iordache@docker.com>2020-06-26 10:21:48 +0200
committeraiordache <anca.iordache@docker.com>2020-07-08 12:31:39 +0200
commitb78c1ec193c5ee65fd59d00a42c4ca996251af57 (patch)
treef8a98046c7a97523865c572da5cb752edf87246b /compose/cli
parent789bfb0e8b2e61f15f423d371508b698c64b057f (diff)
Merge 2.x and 3.x schemas
Signed-off-by: aiordache <anca.iordache@docker.com>
Diffstat (limited to 'compose/cli')
-rw-r--r--compose/cli/main.py17
1 files changed, 5 insertions, 12 deletions
diff --git a/compose/cli/main.py b/compose/cli/main.py
index 0027a7e9..079ea160 100644
--- a/compose/cli/main.py
+++ b/compose/cli/main.py
@@ -24,7 +24,6 @@ from ..config import resolve_build_args
from ..config.environment import Environment
from ..config.serialize import serialize_config
from ..config.types import VolumeSpec
-from ..const import COMPOSEFILE_V2_2 as V2_2
from ..const import IS_WINDOWS_PLATFORM
from ..errors import StreamParseError
from ..progress_stream import StreamOutputError
@@ -205,7 +204,7 @@ class TopLevelCommand(object):
--project-directory PATH Specify an alternate working directory
(default: the path of the Compose file)
--compatibility If set, Compose will attempt to convert keys
- in v3 files to their non-Swarm equivalent
+ in v3 files to their non-Swarm equivalent (DEPRECATED)
--env-file PATH Specify an alternate environment file
Commands:
@@ -882,16 +881,10 @@ class TopLevelCommand(object):
"""
timeout = timeout_from_opts(options)
- if self.project.config_version == V2_2:
- raise UserError(
- 'The scale command is incompatible with the v2.2 format. '
- 'Use the up command with the --scale flag instead.'
- )
- else:
- log.warning(
- 'The scale command is deprecated. '
- 'Use the up command with the --scale flag instead.'
- )
+ log.warning(
+ 'The scale command is deprecated. '
+ 'Use the up command with the --scale flag instead.'
+ )
for service_name, num in parse_scale_args(options['SERVICE=NUM']).items():
self.project.get_service(service_name).scale(num, timeout=timeout)