Invalid path with leading 'null' on Windows 10
See original GitHub issueLatest version 23 creates invalid paths with leading null\
on Window 10.
I encountered this when updating SBT / coursier and dependencies where downloaded to a null
dir inside my project.
Actual
import dev.dirs.ProjectDirectories
import $dep.`dev.dirs:directories:23`
ProjectDirectories.from("org", "scalameta", "metals")
// res0: ProjectDirectories = ProjectDirectories (Windows 10):
// projectPath = 'scalameta\metals'
// cacheDir = 'null\scalameta\metals\cache'
// configDir = 'null\scalameta\metals\config'
// dataDir = 'null\scalameta\metals\data'
// dataLocalDir = 'null\scalameta\metals\data'
// preferenceDir = 'null\scalameta\metals\config'
// runtimeDir = 'null'
Expected
import dev.dirs.ProjectDirectories
import $dep.`dev.dirs:directories:22`
ProjectDirectories.from("org", "scalameta", "metals")
// res0: ProjectDirectories = ProjectDirectories (Windows 10):
// projectPath = 'scalameta\metals'
// cacheDir = 'C:\Users\user\AppData\Local\scalameta\metals\cache'
// configDir = 'C:\Users\user\AppData\Roaming\scalameta\metals\config'
// dataDir = 'C:\Users\user\AppData\Roaming\scalameta\metals\data'
// dataLocalDir = 'C:\Users\user\AppData\Local\scalameta\metals\data'
// preferenceDir = 'C:\Users\user\AppData\Roaming\scalameta\metals\config'
// runtimeDir = 'null'
Environment
OS: Windows 10 1903 JVM: AdoptOpenJDK 1.8.0_222 / 1.8.0_282
Issue Analytics
- State:
- Created 3 years ago
- Comments:15 (3 by maintainers)
Top Results From Across the Web
github/git Checkout Returns 'error: invalid path' on Windows
After researching the error, I've found 2 possible answers: 1) Change the path on the repository file. Unfortunately, this is is a team...
Read more >Windows Invalid path error - Microsoft Community
Windows 10 Home 64 bit. When windows starts a small window opens with the message 'Invalid Path: D:\Top\' What's happening?
Read more >11 Ways to Fix "The System Cannot Find The Path Specified ...
11 Ways to Fix "The System Cannot Find The Path Specified" Error on Windows · 1. Run Command Prompt as an Administrator ·...
Read more >Fix Windows errors that occur during Acrobat Reader update
Fix the Microsoft Windows errors that occur when updating Adobe Acrobat ... 1324, Volume invalid or the path contains an invalid character ...
Read more >Fix JAVA_HOME errors | Invalid directory | Not set or defined
And, it also tells you it's not pointing to the right place, which is helpful as well. All you need to do to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Trying without
-version 2
if Powershell fails sounds sensible to me but I would probably not check the error message because it is localized.Btw, has somebody tried using JNA instead of shelling out to Powershell. Maybe that is easier than fighting Powershell.
Thanks @snlykf and @nartamonov for checking, and thanks to @phongngtuan for fixing it!
Closing this, let me know if you experience this again!