Skip to content

Commit

Permalink
code: make sure the eask-file is defined before executing command
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs090218 committed Apr 18, 2022
1 parent 7e7d073 commit d40e29a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
20 changes: 11 additions & 9 deletions lisp/_prepare.el
Original file line number Diff line number Diff line change
Expand Up @@ -553,15 +553,17 @@ Eask file in the workspace."
(user-init-file (locate-user-emacs-file "init.el"))
(custom-file (locate-user-emacs-file "custom.el")))
(if (eask-file-try-load "../../")
(eask-msg "✓ Loading Eask file in %s... done!" eask-file)
(eask-msg "✗ Loading Eask file... missing!"))
(message "")
(package-activate-all)
(ignore-errors (make-directory package-user-dir t))
(eask--silent (eask-setup-paths))
(run-hooks 'eask-before-command-hook)
(run-hooks (intern (concat "eask-before-" (eask-command) "-hook")))
(eask--with-hooks ,@body))))))))
(progn
(eask-msg "✓ Loading Eask file in %s... done!" eask-file)
(message "")
(package-activate-all)
(ignore-errors (make-directory package-user-dir t))
(eask--silent (eask-setup-paths))
(run-hooks 'eask-before-command-hook)
(run-hooks (intern (concat "eask-before-" (eask-command) "-hook")))
(eask--with-hooks ,@body))
(eask-msg "✗ Loading Eask file... missing!")
(eask-help 'init)))))))))

;;
;;; Eask file
Expand Down
8 changes: 8 additions & 0 deletions lisp/help/init
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

💡 You need to specify an Eask-file in your workspace; to create one use

$ eask init

💡 Or you can execute the command with the -g (--global) option

$ eask [COMMAND] -g

0 comments on commit d40e29a

Please sign in to comment.