Skip to content

Commit

Permalink
chore: add info log on pkgs dir rename
Browse files Browse the repository at this point in the history
  • Loading branch information
tydeu committed Mar 28, 2024
1 parent 5ecfadb commit 6542ac6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/lake/Lake/Load/Main.lean
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,12 @@ def Workspace.updateAndMaterialize
if let some oldRelPkgsDir := manifest.packagesDir? then
let oldPkgsDir := ws.dir / oldRelPkgsDir
if oldRelPkgsDir.normalize != ws.relPkgsDir.normalize && (← oldPkgsDir.pathExists) then
logInfo s!"workspace packages directory changed; renaming '{oldPkgsDir}' to '{ws.pkgsDir}'"
let doRename : IO Unit := do
createParentDirs ws.pkgsDir
IO.FS.rename oldPkgsDir ws.pkgsDir
if let .error e ← doRename.toBaseIO then
error <|
s!"{rootName}: could not rename packages directory " ++
s!"({oldPkgsDir} -> {ws.pkgsDir}): {e}"
error s!"could not rename workspace packages directory: {e}"
| .error (.noFileOrDirectory ..) =>
logInfo s!"{rootName}: no previous manifest, creating one from scratch"
| .error e =>
Expand Down

0 comments on commit 6542ac6

Please sign in to comment.