Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Resolve Upgrade Config file in Container #2193

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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