Skip to content

Commit 5934cc5

Browse files
committed
Chmod files
1 parent c72de1c commit 5934cc5

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/precompile.jl

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,16 @@ end
127127
data_path = joinpath(path, "data")
128128
set_data_path(data_path)
129129

130-
# Copy .default files to expected files
131-
cp(joinpath(path, "Artifacts.toml.default"), joinpath(path, "Artifacts.toml"); force=true)
130+
# Copy .default files to expected files and make them writable
131+
artifacts_toml_path = joinpath(path, "Artifacts.toml")
132+
cp(joinpath(path, "Artifacts.toml.default"), artifacts_toml_path; force=true)
133+
chmod(artifacts_toml_path, 0o644)
132134

133135
version_minor = VERSION.minor
134136
manifest_default = joinpath(path, "Manifest-v1.$version_minor.toml.default")
135137
manifest_actual = joinpath(path, "Manifest-v1.$version_minor.toml")
136138
cp(manifest_default, manifest_actual; force=true)
139+
chmod(manifest_actual, 0o644)
137140

138141
# Use explicit Artifacts API to get the artifact and extract it
139142
artifact_toml = joinpath(path, "Artifacts.toml")
@@ -144,7 +147,10 @@ end
144147
model_dir = artifact_path(model_hash)
145148
mkpath(data_path)
146149
for f in readdir(model_dir)
147-
cp(joinpath(model_dir, f), joinpath(data_path, f); force=true)
150+
src_path = joinpath(model_dir, f)
151+
dest_path = joinpath(data_path, f)
152+
cp(src_path, dest_path; force=true)
153+
chmod(dest_path, 0o644) # Ensure copied artifact file is writable
148154
end
149155
@info "Downloaded and extracted $artifact_name to $data_path"
150156
else

0 commit comments

Comments
 (0)