Skip to content

Commit b79f054

Browse files
committed
Expand project directory when invoking swift commands
It caused a problem when `compilation-directory` includes a tilda.
1 parent e30b9d4 commit b79f054

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

swift-mode-repl.el

+4-2
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,9 @@ Return a JSON object."
294294
(unless project-directory (setq project-directory default-directory))
295295
(swift-mode:call-process-to-json
296296
swift-mode:swift-package-executable
297-
"--package-path" project-directory "describe" "--type" "json"))
297+
"--package-path" (expand-file-name project-directory)
298+
"describe"
299+
"--type" "json"))
298300

299301
(defun swift-mode:read-main-module (project-directory)
300302
"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."
560562
(zerop
561563
(apply #'swift-mode:call-process
562564
swift-mode:swift-build-executable
563-
"--package-path" project-directory
565+
"--package-path" (expand-file-name project-directory)
564566
args))
565567
(compilation-mode)
566568
(goto-char (point-min))

0 commit comments

Comments
 (0)