Skip to content

Commit 344f72e

Browse files
authored
fix #39259, leave Main.ARGS unresolved on startup (#39262)
1 parent 051f47b commit 344f72e

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

contrib/generate_precompile.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This file is a part of Julia. License is MIT: https://julialang.org/license
22

3-
if isempty(ARGS) || ARGS[1] !== "0"
3+
if isempty(Base.ARGS) || Base.ARGS[1] !== "0"
44
Sys.__init_build()
55
# Prevent this from being put into the Main namespace
66
@eval Module() begin

test/cmdlineargs.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,3 +719,6 @@ for yn in ("no", "yes")
719719
end
720720
@test v[2]
721721
end
722+
723+
# issue #39259, shadowing `ARGS`
724+
@test success(`$(Base.julia_cmd()) --startup-file=no -e 'ARGS=1'`)

0 commit comments

Comments
 (0)