You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow ancestor traversal when loading package manifest outside of roots
As a special-case; unlike for configs and workspaces, this allows Cargo
to search all the way up to the root of the filesystem when loading a
package manifest, IFF Cargo is running outside of all configured root
directories.
This exception doesn't apply if Cargo is running within a configured
root directory.
This is a trade off between safety and convenience (+ backwards
compatibility) that ensures it is possible to unpack a package outside
of your home directory (such as `/tmp/my-package`) and then start a
build from a subdirectory like `/tmp/my-package/sub/dir` such that Cargo
will traverse parent directories looking for
`/tmp/my-package/Cargo.toml` but it will not try and load untrusted
configs under `/tmp/.cargo` or workspace manifests under
`/tmp/Cargo.toml` that could have been created by another user.
FIXME: If the first manifest loaded is in fact a workspace manifest
we need to make sure we add that as a root directory so that when
nested packages within the workspace are built they are able to find
their way back to the top of the workspace. Otherwise each nested
package build will be limited to the directory of the package.
0 commit comments