fix: core config apply not working
This commit is contained in:
@ -1,5 +1,5 @@
|
|||||||
"""
|
"""
|
||||||
Entry point for python -m scientific_surfing
|
Entry point for python -m ss
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from .cli import main
|
from .cli import main
|
||||||
|
|||||||
@ -273,7 +273,7 @@ class CoreConfigManager:
|
|||||||
|
|
||||||
def apply(self) -> bool:
|
def apply(self) -> bool:
|
||||||
"""Apply active subscription to generate final config file."""
|
"""Apply active subscription to generate final config file."""
|
||||||
from scientific_surfing.subscription_manager import SubscriptionManager
|
from ss.subscription_manager import SubscriptionManager
|
||||||
|
|
||||||
# Load current configuration
|
# Load current configuration
|
||||||
config = self.load_config()
|
config = self.load_config()
|
||||||
|
|||||||
@ -216,8 +216,6 @@ class WindowsServiceManager(ServiceManagerProtocol):
|
|||||||
|
|
||||||
def uninstall(self, name: str) -> None:
|
def uninstall(self, name: str) -> None:
|
||||||
"""Uninstall a Windows service."""
|
"""Uninstall a Windows service."""
|
||||||
import json
|
|
||||||
from pathlib import Path
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# Stop the service first
|
# Stop the service first
|
||||||
@ -231,7 +229,7 @@ class WindowsServiceManager(ServiceManagerProtocol):
|
|||||||
self._run_as_admin(["sc", "delete", name], f"uninstall service '{name}'")
|
self._run_as_admin(["sc", "delete", name], f"uninstall service '{name}'")
|
||||||
|
|
||||||
# Clean up configuration file
|
# Clean up configuration file
|
||||||
config_dir = Path.home() / ".scientific_surfing" / "service_configs"
|
config_dir = self.config_dir
|
||||||
config_file = config_dir / f"{name}_config.json"
|
config_file = config_dir / f"{name}_config.json"
|
||||||
try:
|
try:
|
||||||
config_file.unlink(missing_ok=True)
|
config_file.unlink(missing_ok=True)
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import sys
|
|||||||
import os
|
import os
|
||||||
sys.path.insert(0, os.path.dirname(__file__))
|
sys.path.insert(0, os.path.dirname(__file__))
|
||||||
|
|
||||||
from scientific_surfing.corecfg_manager import CoreConfigManager
|
from ss.corecfg_manager import CoreConfigManager
|
||||||
|
|
||||||
def test_upgrade():
|
def test_upgrade():
|
||||||
"""Test the upgrade method functionality."""
|
"""Test the upgrade method functionality."""
|
||||||
@ -72,7 +72,7 @@ def test_upgrade():
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
# Test 4: Test directory creation
|
# Test 4: Test directory creation
|
||||||
from scientific_surfing.storage import StorageManager
|
from ss.storage import StorageManager
|
||||||
storage = StorageManager()
|
storage = StorageManager()
|
||||||
binary_dir = storage.config_dir / "bin"
|
binary_dir = storage.config_dir / "bin"
|
||||||
print(f"Binary directory: {binary_dir}")
|
print(f"Binary directory: {binary_dir}")
|
||||||
|
|||||||
Reference in New Issue
Block a user