From 41c950ff3fe096edb5fbbb09e44d08a19cc00ac0 Mon Sep 17 00:00:00 2001 From: Fons van der Plas Date: Tue, 13 Feb 2024 14:50:15 +0100 Subject: [PATCH] Try to fix some permission issues --- Project.toml | 2 +- src/setup_build.jl | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index 1b4bbec..a1b6440 100644 --- a/Project.toml +++ b/Project.toml @@ -2,7 +2,7 @@ name = "PlutoPDF" uuid = "6eb38059-8c05-41f7-8871-5e7e2697ace6" license = "MIT" authors = ["Fons van der Plas", "Connor Burns"] -version = "1.0.0" +version = "1.0.1" [deps] DefaultApplication = "3f0dd361-4fe0-5fc6-8523-80b14ec94d85" diff --git a/src/setup_build.jl b/src/setup_build.jl index b25ddef..92f3b13 100644 --- a/src/setup_build.jl +++ b/src/setup_build.jl @@ -24,7 +24,7 @@ function build_node(dir) if dir !== dirname(node_root_files[1]) for f in node_root_files - cp(f, joinpath(dir, basename(f)); force=true) + readwrite(f, joinpath(dir, basename(f))) end end @@ -36,3 +36,8 @@ function build_node(dir) dir end +"Like `cp` except we create the file manually (to fix permission issues). (It's not plagiarism if you use this function to copy homework.)" +function readwrite(from::AbstractString, to::AbstractString) + write(to, read(from)) +end +