Skip to content

Commit 4a25cf6

Browse files
authored
Add warning for --no-* target specifiers (#245)
Closes #236
1 parent d8cf1a2 commit 4a25cf6

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

ue4docker/build.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def build():
4848

4949
# Parse the supplied command-line arguments
5050
try:
51-
config = BuildConfiguration(parser, sys.argv[1:])
51+
config = BuildConfiguration(parser, sys.argv[1:], logger)
5252
except RuntimeError as e:
5353
logger.error("Error: {}".format(e))
5454
sys.exit(1)

ue4docker/infrastructure/BuildConfiguration.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ def addArguments(parser):
261261
help="Set a specific changelist number in the Unreal Engine's Build.version file",
262262
)
263263

264-
def __init__(self, parser, argv):
264+
def __init__(self, parser, argv, logger):
265265
"""
266266
Creates a new build configuration based on the supplied arguments object
267267
"""
@@ -284,6 +284,10 @@ def __init__(self, parser, argv):
284284
self.args.target = ["all"]
285285
elif using_target_specifier_old and not using_target_specifier_new:
286286
# Convert these to the new style
287+
logger.warning(
288+
"Using deprecated `--no-*` target specifiers; recommend changing to `--target`",
289+
False,
290+
)
287291

288292
# no-minimal implies no-full
289293
if self.args.no_minimal:

ue4docker/infrastructure/Logger.py

+6
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ def info(self, output, newline=True):
2626
"""
2727
Prints information that does not pertain to an action or an error
2828
"""
29+
self._print("green", output, newline)
30+
31+
def warning(self, output, newline=True):
32+
"""
33+
Prints a warning (something that is not an error as of today, but might break in future releases)
34+
"""
2935
self._print("yellow", output, newline)
3036

3137
def _print(self, colour, output, newline):

0 commit comments

Comments
 (0)