vknabel / vscode-swiftformat

SwiftFormat for VS Code
https://marketplace.visualstudio.com/items?itemName=vknabel.vscode-swiftformat
MIT License
39 stars 7 forks source link

SwiftFormat failed. error: File not found #21

Closed bxqgit closed 1 year ago

bxqgit commented 1 year ago

OS: Windows 10 SwiftFormat: Latest vscode-swiftformat: Latest

Error message appears, when trying to format a file:

SwiftFormat failed. error: File not found at C:/Users/foo/AppData/Local/Programs/Microsoft VS Code/c:/prj/Foo/Sources/Foo/main.swift.

For some reason extension uses the wrong path of the file.

The correct path of the file is C:/prj/Foo/Sources/Foo/main.swift

But extension tries to find it at C:/Users/foo/AppData/Local/Programs/Microsoft VS Code/c:/prj/Foo/Sources/Foo/main.swift

vknabel commented 1 year ago

Thanks for the report. I'll try to have a look on this soon.

vknabel commented 1 year ago

@bxqgit I just released an update which should fix your issue. But due to the lack of a windows computer or VM I couldn't confirm the fix.