I have been using to following to change my working directory to the location of my .jl scripts in Atom as follows without problems:
When I run a script with this in vs code, I get an error and it doesn’t change my working directory:
julia> cd(dirname(@__FILE__)) ERROR: IOError: chdir : invalid argument (EINVAL) Stacktrace:  uv_error at .\libuv.jl:97 [inlined]  cd(::String) at .\file.jl:84  top-level scope at REPL:1
The reason that is I think is because there is nothing in the strong for cd() to work on:
julia> @__FILE__ "REPL" julia> dirname(@__FILE__) ""
When I use Alt+Enter to evaluate it inline from within a script, then it works fine. But when I run the actual script I get the error message above.
Any ideas on what is going on?