Skip to content

Commit 05a42c4

Browse files
committed
core: handle root store dir mismatch check result
1 parent 5727827 commit 05a42c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hnix-store-core/src/System/Nix/Internal/StorePath.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ parsePath expectedRoot x =
204204
then pure rootDir'
205205
else Left $ "Root store dir mismatch, expected" <> expectedRootS <> "got" <> rootDir'
206206
in
207-
StorePath <$> coerce storeHash <*> name
207+
either Left (pure $ StorePath <$> coerce storeHash <*> name) storeDir
208208

209209
pathParser :: StoreDir -> Parser StorePath
210210
pathParser expectedRoot = do

0 commit comments

Comments
 (0)