mirror of
https://github.com/doomemacs/doomemacs.git
synced 2025-12-06 10:31:23 -08: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:
parent
b7d9c1801d
commit
1a116f51a9
1 changed files with 3 additions and 2 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue