Skip to content

Commit 2789734

Browse files
committed
JET fix, handle windows
1 parent 9d8a2c6 commit 2789734

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/utils.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ function _walk_appbundle_files(f::Base.Callable, dir::AbstractString)
323323
pred = _PackageBundler.path_filterer(dir)
324324
_walkfiles(dir; descend=pred) do filepath
325325
if !pred(filepath)
326-
@debug "ignoring file in _walk_appbundle_files: $(file)"
326+
@debug "ignoring file in _walk_appbundle_files: $(filepath)"
327327
return nothing
328328
end
329329
return f(filepath)

test/utils.jl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,5 +119,13 @@ end
119119

120120
# The files that are not meant to be included in the /Pkg3/ bundle here are
121121
# all 50 byte files. Should they should show up in the total size here.
122-
@test JuliaHub._max_appbundle_dir_size(dir) == (405, true)
122+
#
123+
# Note: on windows, the files may be checked out with different line endings,
124+
# so the total file size may be slightly different.
125+
sz, sz_is_low = JuliaHub._max_appbundle_dir_size(dir)
126+
@test sz_is_low
127+
@test sz in (Sys.iswindows() ? (405, 432) : (405,))
128+
129+
_, sz_low = JuliaHub._max_appbundle_dir_size(dir; maxsize=200)
130+
@test !sz_low
123131
end

0 commit comments

Comments
 (0)