Skip to content

Commit

Permalink
ensure existing directory
Browse files Browse the repository at this point in the history
I forget every freaking time.  Good place to add a transient wizard ^_^

Signed-off-by: Psionik K <[email protected]>
  • Loading branch information
psionic-k committed Oct 29, 2023
1 parent e2bc362 commit 4372141
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions lisp/erk.el
Original file line number Diff line number Diff line change
Expand Up @@ -757,8 +757,16 @@ implementation information and more details about argument usage."
"Rev, tag, or branch (empty implies default branch): "))
(template (plist-put template :rev rev))
(clone-root
(directory-file-name
(read-directory-name "Clone root: " default-directory)))
(let ((root))
(while (not root)
(let ((candidate
(directory-file-name
(read-directory-name "Clone root (must exist): " default-directory))))
(if (file-directory-p candidate)
(setq root candidate)
(message "Directory must exist!")
(sit-for 1))))
root))
(title
(read-string
"Package full name, for documentation: "
Expand Down

0 comments on commit 4372141

Please sign in to comment.