Pkg dev: change path from C drive to D drive

Hi,

I have a simple question. I would like to change the location of the downloaded package e.g.

pkg.dev(Wflow)

The sustem automatically puts the package into:

C:\Users\jpollacco\.julia\dev

And I simply would like to put it into

D:\julia\dev

I will be more than greatfull if you can kindly let me know how to perform this simple task?

Joseph

You can use a leading question mark in Pkg mode to get some useful documentation.

(@v1.11) pkg> ?dev
  [dev|develop] [--preserve=<opt>] [--shared|--local] pkg[=uuid] ...
  [dev|develop] [--preserve=<opt>] path

  Make a package available for development. If pkg is an existing local path, that path will be recorded in
  the manifest and used. Otherwise, a full git clone of pkg is made. The location of the clone is controlled
  by the --shared (default) and --local arguments. The --shared location defaults to ~/.julia/dev, but can be
  controlled with the JULIA_PKG_DEVDIR environment variable.

  When --local is given, the clone is placed in a dev folder in the current project. This is not supported
  for paths, only registered packages.

  This operation is undone by free.

  The preserve strategies offered by add are also available via the preserve argument. See add for more
  information.

  Examples

  pkg> develop Example
  pkg> develop https://github.com/JuliaLang/Example.jl
  pkg> develop ~/mypackages/Example
  pkg> develop --local Example

A great thanks for show us that to get information you need to put ? bto get some useful documentation.

My understanding you need to change JULIA_PKG_DEVDIR environment, but did not find a way to change it.

I am questioning if with Clone we can achieve the same results?

Thanks for your help,
Joseph

Environment variables are usually set from the operating system, do a web search to find how to do it for your version of Windows.

Alternatively you can set this variable from within Julia, possibly in startup.jl.

julia> ENV["JULIA_PKG_DEVDIR"] = "/tmp/my_deved_packages"
"/tmp/my_deved_packages"

(@v1.10) pkg> dev Example
     Cloning git-repo `https://github.com/JuliaLang/Example.jl.git`
   Resolving package versions...
    Updating `~/.julia/environments/v1.10/Project.toml`
  [7876af07] ~ Example v0.5.5 `/tmp/foo4/Example` ⇒ v0.5.5 `/tmp/my_deved_packages/Example`
    Updating `~/.julia/environments/v1.10/Manifest.toml`
  [7876af07] ~ Example v0.5.5 `/tmp/foo4/Example` ⇒ v0.5.5 `/tmp/my_deved_packages/Example`

Not sure what you mean here but if the idea is to git clone repositories outside of Julia that works fine. Just Pkg.develop them with the path argument instead of package name.