Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b79f054

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

File tree

Expand file treeCollapse file tree

1 file changed

+4
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-2
lines changed
Open diff view settings
Collapse file

‎swift-mode-repl.el‎

Copy file name to clipboardExpand all lines: swift-mode-repl.el
+4-2Lines changed: 4 additions & 2 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.