Skip to content

Commit 8b9044c

Browse files
committed
not changing deployment plan name if it already matches the pattern
1 parent f234005 commit 8b9044c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/src/main/python/wlsdeploy/tool/discover/deployments_discoverer.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,9 @@ def _generate_new_plan_name(binary_path, plan_path):
721721
binary_path = binary_path[0:-1]
722722
prefix = _path_helper.local_basename(binary_path)
723723

724-
new_name = '%s-%s' % (prefix, new_name)
724+
# don't bother changing the name if the name already matches the pattern <app-name>-<plan-name>
725+
if not string_utils.is_empty(prefix) and not new_name.startswith('%s-' % prefix):
726+
new_name = '%s-%s' % (prefix, new_name)
725727

726728
_logger.exiting(class_name=_class_name, method_name=_method_name, result=new_name)
727729
return new_name

0 commit comments

Comments
 (0)