Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix failing upgrade message #269

Closed
wants to merge 1 commit into from
Closed

Fix failing upgrade message #269

wants to merge 1 commit into from

Conversation

rejeep
Copy link
Member

@rejeep rejeep commented Dec 25, 2014

If an upgrade fails, there is no dependency to print the name of. Just
print the error message in such case.

If an upgrade fails, there is no dependency to print the name of.  Just
print the error message in such case.
@proofit404
Copy link

I try to reproduce situation with missing (source gnu):

cask install --debug                                                                                                     ~/.emacs.d
Wrote /home/proofit404/.emacs.d/.cask/24.3.1/elpa/archives/melpa/archive-contents
Debugger entered--Lisp error: (void-variable dependency)
  (error "Dependency %s failed to install: %s\nOutput:\n%s" dependency message output)
  (let ((name (progn (or (and (vectorp (nth 0 data)) (>= (length ...) 8) (memq (aref ... 0) cl-struct-cask-dependency-tags)) (error "%s accessing a non-%s" (quote cask-dependency-name) (quote cask-dependency))) (aref (nth 0 data) 1))) (message (error-message-string (nth 1 data))) (output (nth 2 data))) (error "Dependency %s failed to install: %s\nOutput:\n%s" dependency message output))
  (if (nth 0 data) (let ((name (progn (or (and (vectorp ...) (>= ... 8) (memq ... cl-struct-cask-dependency-tags)) (error "%s accessing a non-%s" (quote cask-dependency-name) (quote cask-dependency))) (aref (nth 0 data) 1))) (message (error-message-string (nth 1 data))) (output (nth 2 data))) (error "Dependency %s failed to install: %s\nOutput:\n%s" dependency message output)) (error "Package installation failed: %s\nOutput:\n%s" message output))
  (let ((data (cdr err))) (if (nth 0 data) (let ((name (progn (or (and ... ... ...) (error "%s accessing a non-%s" ... ...)) (aref (nth 0 data) 1))) (message (error-message-string (nth 1 data))) (output (nth 2 data))) (error "Dependency %s failed to install: %s\nOutput:\n%s" dependency message output)) (error "Package installation failed: %s\nOutput:\n%s" message output)))
  (condition-case err (progn (cask-install (cask-cli--bundle))) (cask-missing-dependencies (let ((missing-dependencies (cdr err))) (error "Some dependencies were not available: %s" (s-join ", " (-map (function symbol-name) (-map (function cask-dependency-name) missing-dependencies)))))) (cask-failed-initialization (let* ((data (cdr err)) (message (error-message-string (nth 0 data))) (output (nth 1 data))) (error "Package initialization failed: %s\nOutput:\n%s" message output))) (cask-failed-installation (let ((data (cdr err))) (if (nth 0 data) (let ((name (progn ... ...)) (message (error-message-string ...)) (output (nth 2 data))) (error "Dependency %s failed to install: %s\nOutput:\n%s" dependency message output)) (error "Package installation failed: %s\nOutput:\n%s" message output)))))
  cask-cli/install()
  commander--handle-command(("install"))
  commander-parse(("install" "--debug"))
  (if commander-parsing-done nil (commander-parse (or commander-args (cdr command-line-args-left))))
  (progn (setq commander-default-config nil) (setq commander-options nil) (setq commander-commands nil) (setq commander-name nil) (setq commander-description nil) (setq commander-default-command nil) (setq commander-no-command nil) (setq commander-parsing-done nil) (-each (quote ((name "cask") (description "Emacs dependency management made easy") (default "install") (command "pkg-file" cask-cli/pkg-file) (command "install" cask-cli/install) (command "update" cask-cli/update) (command "upgrade" cask-cli/upgrade-cask) (command "upgrade-cask" cask-cli/upgrade-cask) (command "exec [*]" cask-cli/exec) (command "init" cask-cli/init) (command "version" cask-cli/version) (command "list" cask-cli/list) (command "info" cask-cli/info) (command "help [command]" cask-cli/help) (command "load-path" cask-cli/load-path) (command "exec-path" cask-cli/exec-path) (command "path" cask-cli/exec-path) (command "package-directory" cask-cli/package-directory) (command "outdated" cask-cli/outdated) (command "files" cask-cli/files) (command "build" cask-cli/build) (command "clean-elc" cask-cli/clean-elc) (command "link [*]" cask-cli/link) (command "package [target-dir]" cask-cli/package) (option "--proxy <host>" cask-cli/cask-proxy) (option "--http-proxy <host>" cask-cli/cask-http-proxy) (option "--https-proxy <host>" cask-cli/cask-https-proxy) (option "--no-proxy" cask-cli/cask-no-proxy) (option "--version" cask-cli/cask-version) (option "-h [command], --help [command]" cask-cli/help) (option "--dev" cask-cli/dev) (option "--debug" cask-cli/debug) (option "--path <path>" cask-cli/set-path) (option "--verbose" cask-cli/verbose))) (function (lambda (form) (cond ((eql (car form) (quote option)) (progn (let* ... ...))) ((eql (car form) (quote command)) (progn (let* ... ...))) ((eql (car form) (quote parse)) (progn (let* ... ... ...))) ((eql (car form) (quote name)) (progn (let* ... ...))) ((eql (car form) (quote description)) (progn (let* ... ...))) ((eql (car form) (quote config)) (progn (let* ... ...))) ((eql (car form) (quote default)) (progn (let* ... ...))) (t (error "Unknown directive: %S" form)))))) (if commander-parsing-done nil (commander-parse (or commander-args (cdr command-line-args-left)))))
  eval-buffer(#<buffer  *load*> nil "/home/proofit404/.local/src/cask/cask-cli.el" nil t)  ; Reading at buffer position 12888
  load-with-code-conversion("/home/proofit404/.local/src/cask/cask-cli.el" "/home/proofit404/.local/src/cask/cask-cli.el" nil t)
  load("/home/proofit404/.local/src/cask/cask-cli.el" nil t t)
  command-line-1(("-scriptload" "/home/proofit404/.local/src/cask/cask-cli.el" "--" "install" "--debug"))
  command-line()
  normal-top-level()

@rejeep rejeep closed this Nov 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants