-
-
Notifications
You must be signed in to change notification settings - Fork 285
Closed
Closed
Copy link
Description
I registered a package called Desktop.jl (provides portable functions for basic GUI Desktop interactions, namely checking for presence of GUI desktop, as well as opening URLs and files).
With hindsight that particular package name turned out to be a slightly problematic, because Pkg can get confused by the directory Desktop that many users have in their home directory:
$ cd ~
$ ls -d Desktop
Desktop
$ julia
(@v1.5) pkg> add Desktop
[ Info: Resolving package identifier `Desktop` as a directory at `~/Desktop`.
ERROR: Did not find a git repository at `Desktop`
(@v1.5) pkg>
I found three alternative workarounds:
- change the current working directory to one that does not contain a subdirectory whose name collides with that of the registered package to be added
- use
] add Desktop.jlinstead of] add Desktop - use
Pkg.add("Desktop")instead of] add Desktop
I was surprised that ] add Desktop behaved differently from Pkg.add("Desktop").
Perhaps it should ignore subdirectories in the current working directory that lack a Project.toml file or a .git subdirectory, just output a warning that it ignored that directory, and then move on to search the registry?
Metadata
Metadata
Assignees
Labels
No labels