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
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If an upgrade fails, there is no dependency to print the name of. Just print the error message in such case.
I try to reproduce situation with missing 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()
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If an upgrade fails, there is no dependency to print the name of. Just
print the error message in such case.