Conversation
`update_all` pipes the installed crates to `xargs -n1 cargo install`. With no crate installed, xargs still runs `cargo install` once without arguments, so every `dot package update_all` prints a cargo error, for example "<dir> is not a crate root; specify a crate to install from crates.io", and then reports "Done". Reading the list in a loop runs nothing for an empty list. It avoids GNU `xargs -r`, which the BSD xargs on macOS does not reliably provide.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #283
Problem
dot package update_allpipes the installed crates toxargs -n1 cargo install. When cargo is installed but no crate is, xargs still runscargo installonce without arguments, so every run prints a cargo error (<dir> is not a crate root; specify a crate to install from crates.io ...) and then reportsDone.Fix
Read the crate list in a
while readloop, which runs nothing for an empty list and keeps onecargo install <crate>per crate, the behaviour #113 introduced for several crates. This avoids GNUxargs -r, which BSD xargs on macOS does not reliably provide.Testing
cargo:cargo installcall (before: one call without arguments);cargo install docparsandcargo install ripgrep, the same as before.scripts/self/static_analysisandscripts/self/lintpass.