branch: elpa/swift-mode commit b79f0542bac8e7d740244a1d4c61180101bccf7e Author: taku0 <mxxouy6x3m_git...@tatapa.org> Commit: taku0 <mxxouy6x3m_git...@tatapa.org>
Expand project directory when invoking swift commands It caused a problem when `compilation-directory` includes a tilda. --- swift-mode-repl.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/swift-mode-repl.el b/swift-mode-repl.el index 72de42c020..085bfd47ac 100644 --- a/swift-mode-repl.el +++ b/swift-mode-repl.el @@ -294,7 +294,9 @@ Return a JSON object." (unless project-directory (setq project-directory default-directory)) (swift-mode:call-process-to-json swift-mode:swift-package-executable - "--package-path" project-directory "describe" "--type" "json")) + "--package-path" (expand-file-name project-directory) + "describe" + "--type" "json")) (defun swift-mode:read-main-module (project-directory) "Read the main module description from the manifest file Package.swift. @@ -560,7 +562,7 @@ An list ARGS are appended for builder command line arguments." (zerop (apply #'swift-mode:call-process swift-mode:swift-build-executable - "--package-path" project-directory + "--package-path" (expand-file-name project-directory) args)) (compilation-mode) (goto-char (point-min))