Skip to content

Commit 825be1f

Browse files
authored
Fixed exit context problem for older WLS versions (#613)
* Add switch when creating model context for exit due to CLA failure
1 parent bed1e43 commit 825be1f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

core/src/main/python/wlsdeploy/tool/util/model_context_helper.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Copyright (c) 2019, Oracle Corporation and/or its affiliates. All rights reserved.
2+
Copyright (c) 2020, Oracle Corporation and/or its affiliates.
33
Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
44
"""
55
from wlsdeploy.tool.create.domain_typedef import DomainTypedef
@@ -28,12 +28,13 @@ def create_context(program_name, combined_arg_map, domain_typedef=None):
2828

2929
def create_exit_context(program_name):
3030
"""
31-
Create a minimal model for use when a tool exits due to command-line parsing errors.
31+
Create a minimal model context for use when a tool exits due to command-line parsing errors.
3232
This will provide some of the values needed for the summary logging.
3333
:param program_name: the program name, used for logging
3434
:return: the new, minimal model context object
3535
"""
36-
return create_context(program_name, dict())
36+
# Oracle home switch is required for typedef template token resolution, for older WLS versions.
37+
return create_context(program_name, {CommandLineArgUtil.ORACLE_HOME_SWITCH: ""})
3738

3839

3940
def create_typedef(program_name, argument_map):

0 commit comments

Comments
 (0)