Skip to content

Commit 22b544e

Browse files
committed
Enable StorePath to contain /tmp/ when created from PathBuf
1 parent 7f9d3c0 commit 22b544e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ impl TryFrom<PathBuf> for StorePath {
4444

4545
fn try_from(path: PathBuf) -> Result<Self> {
4646
tracing::trace!(path = %path.display(), "validating store path");
47-
if !path.starts_with("/nix/store") {
48-
tracing::warn!(path = %path.display(), "path does not start with /nix/store");
47+
if !(path.starts_with("/nix/store") || path.starts_with("/tmp/")) {
48+
tracing::warn!(path = %path.display(), "path does not start with /nix/store or /tmp/");
4949
bail!(
50-
"path {path} must start with /nix/store",
50+
"path {path} must start with /nix/store or /tmp/",
5151
path = path.display(),
5252
);
5353
}

0 commit comments

Comments
 (0)