Merge pull request 'Fixed clan uri. Expand user, then resolve' (#773) from Qubasa-main into main
This commit is contained in:
@@ -98,10 +98,9 @@ class ClanURI:
|
|||||||
self._components.query,
|
self._components.query,
|
||||||
self._components.fragment,
|
self._components.fragment,
|
||||||
)
|
)
|
||||||
|
|
||||||
match comb:
|
match comb:
|
||||||
case ("file", "", path, "", "", "") | ("", "", path, "", "", ""): # type: ignore
|
case ("file", "", path, "", "", "") | ("", "", path, "", "", _): # type: ignore
|
||||||
self.scheme = ClanScheme.LOCAL.value(Path(path).resolve()) # type: ignore
|
self.scheme = ClanScheme.LOCAL.value(Path(path).expanduser().resolve()) # type: ignore
|
||||||
case _:
|
case _:
|
||||||
self.scheme = ClanScheme.REMOTE.value(self._components.geturl()) # type: ignore
|
self.scheme = ClanScheme.REMOTE.value(self._components.geturl()) # type: ignore
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import argparse
|
|||||||
import dataclasses
|
import dataclasses
|
||||||
import datetime
|
import datetime
|
||||||
import json
|
import json
|
||||||
|
import logging
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
from clan_cli.flakes.inspect import FlakeConfig, inspect_flake
|
from clan_cli.flakes.inspect import FlakeConfig, inspect_flake
|
||||||
@@ -12,6 +13,8 @@ from ..dirs import user_history_file
|
|||||||
from ..errors import ClanError
|
from ..errors import ClanError
|
||||||
from ..locked_open import read_history_file, write_history_file
|
from ..locked_open import read_history_file, write_history_file
|
||||||
|
|
||||||
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class EnhancedJSONEncoder(json.JSONEncoder):
|
class EnhancedJSONEncoder(json.JSONEncoder):
|
||||||
def default(self, o: Any) -> Any:
|
def default(self, o: Any) -> Any:
|
||||||
|
|||||||
@@ -191,4 +191,6 @@ class ClanList(Gtk.Box):
|
|||||||
switch.set_state(vm.is_running())
|
switch.set_state(vm.is_running())
|
||||||
|
|
||||||
if not vm.is_running() and vm.process.proc.exitcode != 0:
|
if not vm.is_running() and vm.process.proc.exitcode != 0:
|
||||||
self.show_error_dialog(vm.read_log())
|
print("VM exited with error. Exitcode:", vm.process.proc.exitcode)
|
||||||
|
# print(vm.read_log())
|
||||||
|
# self.show_error_dialog(vm.read_log())
|
||||||
|
|||||||
Reference in New Issue
Block a user