on master help sign in
Create .attr-cache on thunk creation; account for it in readThunk
commita67be1ead310be85be3291b59987d022acc8b0bf authorMadeline Haraj <min@obsidian.systems> dateFri 5 Jan 2018, 11:42 (9 years ago) parent0d31bc3
1 file changed+2−2
command/src/Obelisk/Command/Thunk.hs+2−2
command/src/Obelisk/Command/Thunk.hs+2−2
@@ -122,7 +122,7 @@ readThunk thunkDir = do
122122
123123 -- Ensure that there aren't any other files in the thunk
124124 files <- listDirectory thunkDir
125− guard $ length files == 2
125+ guard $ length files == 3
126126
127127 txt <- LBS.readFile githubJson
128128 let p v = do
@@ -157,7 +157,7 @@ overwriteThunk target thunk = do
157157
158158createThunk :: FilePath -> ThunkPtr -> IO ()
159159createThunk target thunk = do
160− createDirectory target
160+ createDirectoryIfMissing True (target </> ".attr-cache")
161161 case _thunkPtr_source thunk of
162162 ThunkSource_GitHub s -> do
163163 T.writeFile (target </> "default.nix") $ NonEmpty.head gitHubStandaloneLoaders