Skip to content

Commit

Permalink
fix(pipx): depend on python
Browse files Browse the repository at this point in the history
Fixes a race condition when installing with pipx forge. Later I should
improve this to fetch transitive dependencies so this does not need
to be manually specified.
  • Loading branch information
jdx committed May 15, 2024
1 parent 7dea795 commit 89b9c9a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
4 changes: 1 addition & 3 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ where
U: IntoIterator,
U::Item: Into<OsString>,
{
// TODO: move this into a generic forge method/macro (#2125)
// TODO: fetch transitive dependencies like pipx -> python
let config = Config::get();
let dependencies = forge
.get_dependencies(&ToolRequest::System(forge.name().into()))?
Expand Down
2 changes: 1 addition & 1 deletion src/forge/pipx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ impl Forge for PIPXForge {
}

fn get_dependencies(&self, _tvr: &ToolRequest) -> eyre::Result<Vec<ForgeArg>> {
Ok(vec!["pipx".into()])
Ok(vec!["pipx".into(), "python".into()])
}

/*
Expand Down
1 change: 1 addition & 0 deletions src/toolset/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ impl Toolset {
debug!("installing {} leaf tools first", leaf_deps.len());
self.install_versions(config, leaf_deps.into_iter().cloned().collect(), mpr, opts)?;
}
debug!("install_versions: {}", versions.iter().join(" "));
let settings = Settings::try_get()?;
let queue: Vec<_> = versions
.into_iter()
Expand Down

0 comments on commit 89b9c9a

Please sign in to comment.