Skip to content

Commit

Permalink
Merge pull request #2193 from shaangill025/fix_upgrade_process
Browse files Browse the repository at this point in the history
Fix: Resolve Upgrade Config file in Container
  • Loading branch information
swcurran authored Mar 31, 2023
2 parents 04fa9f2 + 458ce43 commit 5858042
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions aries_cloudagent/commands/upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import asyncio
import logging
import os
import yaml

from configargparse import ArgumentParser
Expand All @@ -23,9 +24,7 @@

from . import PROG

DEFAULT_UPGRADE_CONFIG_PATH = (
"./aries_cloudagent/commands/default_version_upgrade_config.yml"
)
DEFAULT_UPGRADE_CONFIG_FILE_NAME = "default_version_upgrade_config.yml"
LOGGER = logging.getLogger(__name__)


Expand All @@ -43,7 +42,12 @@ def __init__(self, config_path: str = None):
if config_path:
self.setup_version_upgrade_config(config_path)
else:
self.setup_version_upgrade_config(DEFAULT_UPGRADE_CONFIG_PATH)
self.setup_version_upgrade_config(
os.path.join(
os.path.dirname(os.path.realpath(__file__)),
DEFAULT_UPGRADE_CONFIG_FILE_NAME,
)
)

def setup_version_upgrade_config(self, path: str):
"""Set ups config dict from the provided YML file."""
Expand Down

0 comments on commit 5858042

Please sign in to comment.