Skip to content

Commit e1726f8

Browse files
authored
Merge pull request #75 from conao3/feature/74
Do not run `package-initialize` when no subcommand is provided
2 parents fead3b4 + 320a9ab commit e1726f8

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

keg-command.el

+4-7
Original file line numberDiff line numberDiff line change
@@ -343,18 +343,15 @@ USAGE: keg run [SCRIPT]"
343343
(unless noninteractive
344344
(error "`keg-command' is to be used only with --batch"))
345345
(let* ((opraw (car command-line-args-left))
346-
(op (when opraw (intern opraw)))
346+
(op (if opraw
347+
(intern opraw)
348+
(if (file-exists-p "Keg")
349+
'install 'help)))
347350
(args (cdr command-line-args-left))
348351
(no-install (keg--no-install-p op keg-no-install-commands)))
349352
(when (not (memq op keg-global-commands))
350353
(keg-initialize))
351354
(cond
352-
((and
353-
(memq op keg-global-commands)
354-
(not (file-exists-p "Keg")))
355-
(keg--princ "Missing Keg file in current directory")
356-
(keg--princ "Exec `keg init' to create Keg file")
357-
(keg--princ ""))
358355
((and
359356
(not (memq op keg-global-commands))
360357
(not (file-exists-p "Keg")))

0 commit comments

Comments
 (0)