pub struct PathSection {
pub auto_chmod_exec: bool,
}Expand description
PATH handler settings.
Fields§
§auto_chmod_exec: boolAutomatically add execute permissions (+x) to files inside
bin/ directories staged by the path handler.
§Rationale
Files placed in a bin/ directory are there because the pack
author intends them as executables — the directory’s purpose is
to expose commands via $PATH. However, execute bits can be
lost in common workflows:
- Git on macOS defaults to
core.fileMode = false, so cloned repos may have0o644on scripts. - Manual file creation often forgets
chmod +x.
Without +x the shell finds the file via PATH lookup but fails
with “permission denied” — a confusing error when the file is
clearly in the right place.
With this option enabled (the default), dodot up ensures every
file in a path-handler directory is executable, matching the
user’s intent. Files that are already executable are left
untouched. Failures are reported as warnings, not hard errors.
Set to false if you have bin/ files that intentionally
should not be executable (e.g. data files or library scripts
sourced by other scripts).
Trait Implementations§
Source§impl Clone for PathSection
impl Clone for PathSection
Source§fn clone(&self) -> PathSection
fn clone(&self) -> PathSection
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Config for PathSection
impl Config for PathSection
Source§type Layer = PathSectionLayer
type Layer = PathSectionLayer
Self (a potentially partial configuration). Read moreSource§fn from_layer(layer: Self::Layer) -> Result<Self, Error>
fn from_layer(layer: Self::Layer) -> Result<Self, Error>
Self from a layer and validates itself. Read moreSource§fn builder() -> Builder<Self>
fn builder() -> Builder<Self>
#[default = ...]) are merged
(with the lowest priority). Read more