File tree Expand file tree Collapse file tree 1 file changed +15
-11
lines changed Expand file tree Collapse file tree 1 file changed +15
-11
lines changed Original file line number Diff line number Diff line change @@ -361,17 +361,21 @@ Incremented after each change.")
361361(defun copilot-install-server ()
362362 " Interactively install server."
363363 (interactive )
364- (if-let* ((npm-binary (executable-find " npm" )))
365- (progn
366- (make-directory copilot-install-dir 'parents )
367- (copilot-async-start-process
368- nil nil
369- npm-binary
370- " -g" " --prefix" copilot-install-dir
371- " install" (concat copilot-server-package-name
372- (when copilot-version (format " @%s " copilot-version)))))
373- (copilot--log 'warning " Unable to install %s via `npm' because it is not present" copilot-server-package-name)
374- nil ))
364+ (let* ((default-directory (if (file-remote-p default-directory)
365+ " ~/"
366+ default-directory))
367+ (npm-binary (executable-find " npm" )))
368+ (if npm-binary
369+ (progn
370+ (make-directory copilot-install-dir 'parents )
371+ (copilot-async-start-process
372+ nil nil
373+ npm-binary
374+ " -g" " --prefix" copilot-install-dir
375+ " install" (concat copilot-server-package-name
376+ (when copilot-version (format " @%s " copilot-version)))))
377+ (copilot--log 'warning " Unable to install %s via `npm' because it is not present" copilot-server-package-name)
378+ nil )))
375379
376380;;;### autoload
377381(defun copilot-uninstall-server ()
You can’t perform that action at this time.
0 commit comments