mirror of
https://github.com/doomemacs/doomemacs
synced 2025-09-26 16:41:04 -05:00
fix(upload): ensure ssh-deploy is loaded
The ssh-deploy-root-remote check isn't enough (they may be set file/dir locally before the package is loaded).
This commit is contained in:
@@ -27,6 +27,7 @@
|
|||||||
(add-hook! 'after-save-hook
|
(add-hook! 'after-save-hook
|
||||||
(defun +upload-init-after-save-h ()
|
(defun +upload-init-after-save-h ()
|
||||||
(when (and (bound-and-true-p ssh-deploy-root-remote)
|
(when (and (bound-and-true-p ssh-deploy-root-remote)
|
||||||
|
(require 'ssh-deploy nil t)
|
||||||
(integerp ssh-deploy-on-explicit-save)
|
(integerp ssh-deploy-on-explicit-save)
|
||||||
(> ssh-deploy-on-explicit-save 0))
|
(> ssh-deploy-on-explicit-save 0))
|
||||||
(ssh-deploy-upload-handler ssh-deploy-force-on-explicit-save)
|
(ssh-deploy-upload-handler ssh-deploy-force-on-explicit-save)
|
||||||
@@ -38,8 +39,8 @@
|
|||||||
;; (if possible)
|
;; (if possible)
|
||||||
(add-hook! 'find-file-hook
|
(add-hook! 'find-file-hook
|
||||||
(defun +upload-init-find-file-h ()
|
(defun +upload-init-find-file-h ()
|
||||||
(when (bound-and-true-p ssh-deploy-root-remote)
|
(when (and (bound-and-true-p ssh-deploy-root-remote)
|
||||||
(require 'ssh-deploy)
|
(require 'ssh-deploy nil t))
|
||||||
(unless ssh-deploy-root-local
|
(unless ssh-deploy-root-local
|
||||||
(setq ssh-deploy-root-local (doom-project-root)))
|
(setq ssh-deploy-root-local (doom-project-root)))
|
||||||
(when ssh-deploy-automatically-detect-remote-changes
|
(when ssh-deploy-automatically-detect-remote-changes
|
||||||
|
Reference in New Issue
Block a user