Skip to content
This repository was archived by the owner on May 6, 2025. It is now read-only.

Commit ebfa871

Browse files
committed
list
1 parent 8c5d414 commit ebfa871

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

actions/assistant.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ def _install_pip(repo: Dict[str, str]) -> str:
163163
pkg += f"[{repo['install_extras']}]"
164164
if "checkout" in repo:
165165
pkg += f"=={repo['checkout']}"
166-
flags = " ".join(["--quiet"] + repo.get('install_flags', []))
167-
cmd = " ".join(["pip install", pkg, flags])
166+
flags = set(["--quiet"] + repo.get("install_flags", []))
167+
cmd = " ".join(["pip install", pkg, " ".join(flags)])
168168
return cmd
169169

170170
@staticmethod
@@ -184,13 +184,18 @@ def _install_repo(repo: Dict[str, str], remove_dir: bool = True) -> List[str]:
184184
if "requirements_file" in repo:
185185
reqs = repo["requirements_file"]
186186
reqs = [reqs] if isinstance(reqs, str) else reqs
187-
cmds.append(f"pip install --quiet --upgrade {' '.join([f'-r {req}' for req in reqs])}")
187+
args = [f"-r {req}" for req in reqs] + ["--quiet", "--upgrade"]
188+
cmds.append("pip install " + " ".join(args))
188189

189190
pip_install = "."
190191
if "install_extras" in repo:
191192
pip_install += f"[{AssistantCLI._extras(repo['install_extras'])}]"
192-
cmds.append(f"pip install --quiet {pip_install}")
193+
194+
flags = ["--quiet"] + repo.get("install_flags", [])
195+
cmds.append("pip install " + " ".join([pip_install] + flags))
196+
cmds.append("pip list")
193197
cmds.append("cd ..")
198+
194199
if remove_dir:
195200
cmds.append(f"rm -rf {repo_name}")
196201
return cmds

0 commit comments

Comments
 (0)