@@ -118,6 +118,10 @@ def is_installed_one(self, item: Installable) -> InstallStatusResult:
118118 return InstallStatusResult (False , f"Git repository { item .url } not cloned" )
119119 elif isinstance (item , PythonExecutable ):
120120 return self ._is_python_executable_installed (item )
121+ elif isinstance (item , File ):
122+ if item .installed_path and item .installed_path .exists ():
123+ return InstallStatusResult (True )
124+ return InstallStatusResult (False , f"File { item .installed_path } does not exist." )
121125 elif isinstance (item , HFModel ):
122126 return self .hf_model_manager .is_model_downloaded (item )
123127 return InstallStatusResult (False , f"Unsupported item type: { type (item )} " )
@@ -132,6 +136,9 @@ def mark_as_installed_one(self, item: Installable) -> InstallStatusResult:
132136 item .git_repo .installed_path = self .system .install_path / item .git_repo .repo_name
133137 item .venv_path = self .system .install_path / item .venv_name
134138 return InstallStatusResult (True )
139+ elif isinstance (item , File ):
140+ item .installed_path = self .system .install_path / item .src .name
141+ return InstallStatusResult (True )
135142 elif isinstance (item , HFModel ):
136143 item .installed_path = self .system .hf_home_path # fake path is OK here as the whole HF home will be mounted
137144 return InstallStatusResult (True )
0 commit comments