Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev .. : Relative directory failing under Windows when having cd'ed with incorrect case #3892

Open
divbyzerofordummies opened this issue May 3, 2024 · 3 comments

Comments

@divbyzerofordummies
Copy link

I have a minor issue when trying to dev a relative directory in REPL package mode.

My package has uppercase letters, say MyPackage, but I have moved there using the shell environment, having used a lower case letter by mistake:

shell> cd mypackage/test

which works.

pwd() gives the global path with mypackage in lower case letters, so the mistake is not "corrected".

If I activate the environment there (still works) and try to dev the parent folder, I get

(test) pkg> dev ..
ERROR: `..` appears to be a local path, but directory does not exist

Funnily, FileSystem does not have any issues:

julia> Base.Filesystem.readdir("..")

works as expected.

Also, this is not a Pkg.jl bug since

julia> import Pkg; Pkg.develop(path="..")

works as well.

My versioninfo() output is:

Julia Version 1.9.3
Commit bed2cd540a (2023-08-24 14:43 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 12 × 12th Gen Intel(R) Core(TM) i5-12400
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, alderlake)
  Threads: 4 on 12 virtual cores
Environment:
  JULIA_EDITOR = code
  JULIA_NUM_THREADS = 4
@fredrikekre
Copy link
Member

Does (test) pkg> dev ./.. work?

@fredrikekre fredrikekre transferred this issue from JuliaLang/julia May 3, 2024
@KristofferC
Copy link
Sponsor Member

It is explicitly checking case sensitively in

if casesensitive_isdir(expanduser(word))

Not sure if it should

@divbyzerofordummies
Copy link
Author

Does (test) pkg> dev ./.. work?

No, same error:

ERROR: `./..` appears to be a local path, but directory does not exist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants