pub struct PathSectionLayer {
pub auto_chmod_exec: Option<bool>,
}Fields§
§auto_chmod_exec: Option<bool>Automatically 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<'de> Deserialize<'de> for PathSectionLayer
impl<'de> Deserialize<'de> for PathSectionLayer
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Layer for PathSectionLayer
impl Layer for PathSectionLayer
Source§fn default_values() -> Self
fn default_values() -> Self
#[config(default = ...)] when deriving Config) with all remaining
values/fields set to None/being empty.Source§fn from_env() -> Result<Self, Error>
fn from_env() -> Result<Self, Error>
#[config(env = "...")]: all fields not
annotated env will be None. Read moreSource§fn with_fallback(self, fallback: Self) -> Self
fn with_fallback(self, fallback: Self) -> Self
self has a higher priority; missing values in
self are filled with values in fallback, if they exist. The
semantics of this method is basically like in Option::or.Source§fn is_complete(&self) -> bool
fn is_complete(&self) -> bool
true if all required (non-optional) values in this
configuration are set. If this returns true, Config::from_layer
will not return an error.