Skip to content

Commit d7193ec

Browse files
committed
Rename at-scriptdir project argument to at-script
1 parent aecd8fd commit d7193ec

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ difference between defining a `main` function and executing the code directly at
6868
* The `--compiled-modules` and `--pkgimages` flags can now be set to `existing`, which will
6969
cause Julia to consider loading existing cache files, but not to create new ones ([#50586]
7070
and [#52573]).
71+
* The `--project` argument now accepts `@script` to give a path to a directory with a Project.toml relative to the passed script file. E.g. `--project=@script` for the same directory or `--project=@script/foo` for the `foo` subdirectory. ([#50864] and [#53352])
7172

7273
Multi-threading changes
7374
-----------------------

base/initdefs.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ function load_path_expand(env::AbstractString)::Union{String, Nothing}
272272
env == "@" && return active_project(false)
273273
env == "@." && return current_project()
274274
env == "@stdlib" && return Sys.STDLIB
275-
if startswith(env, "@scriptdir")
275+
if startswith(env, "@script")
276276
if @isdefined(PROGRAM_FILE)
277277
dir = dirname(PROGRAM_FILE)
278278
else
@@ -283,7 +283,7 @@ function load_path_expand(env::AbstractString)::Union{String, Nothing}
283283
end
284284
dir = dirname(ARGS[1])
285285
end
286-
return abspath(replace(env, "@scriptdir" => dir))
286+
return abspath(replace(env, "@script" => dir))
287287
end
288288
env = replace(env, '#' => VERSION.major, count=1)
289289
env = replace(env, '#' => VERSION.minor, count=1)

0 commit comments

Comments
 (0)