summaryrefslogtreecommitdiff
path: root/src/package_installer.rs
diff options
context:
space:
mode:
authorHermes Agent <hermes@localhost>2026-08-12 04:54:43 +0000
committerHermes Agent <hermes@localhost>2026-08-12 04:54:43 +0000
commit4c01f2c2464f4133cb48125c8f2c55827cf0bf67 (patch)
tree283be3ebed1ed658d7be92a11b362fec64aa7d6d /src/package_installer.rs
parenta73d7e29c0064e0a40ffcfb98f6b349ced5463b2 (diff)
Validate APT config before creating build workspace
Diffstat (limited to 'src/package_installer.rs')
-rw-r--r--src/package_installer.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/package_installer.rs b/src/package_installer.rs
index c5c6451..03e429f 100644
--- a/src/package_installer.rs
+++ b/src/package_installer.rs
@@ -11,6 +11,9 @@ impl AptConfig {
if path.as_os_str().is_empty() || path.is_dir() {
bail!("APT configuration must be a file path: {}", path.display());
}
+ if !path.is_file() {
+ bail!("APT configuration does not exist or is not a regular file: {}", path.display());
+ }
Ok(Self(path.to_path_buf()))
}