diff --git a/client/starwhale/base/uri.py b/client/starwhale/base/uri.py index 625a80fa9e..7aa8a57bf1 100644 --- a/client/starwhale/base/uri.py +++ b/client/starwhale/base/uri.py @@ -89,12 +89,12 @@ def _do_parse_instance_uri(self, raw: str) -> t.Tuple[InstanceField, str]: _remain = "" if len(_sp) == 1 else _sp[1] _inst_type = InstanceType.STANDALONE else: - _sp = [raw] - if self.expected_type == URIType.PROJECT: - _sp = raw.split("/", 1) - _inst = self._sw_config._config["instances"].get(_sp[0], {}).get("uri", "") - _inst_type = InstanceType.CLOUD + _sp = raw.split("/", 1) _inst_alias = _sp[0] + _inst = ( + self._sw_config._config["instances"].get(_inst_alias, {}).get("uri", "") + ) + _inst_type = InstanceType.CLOUD if _inst: _remain = "" if len(_sp) == 1 else _sp[1]