From d2d0a9b336f9d424c1bd66c3421cee4a8e111100 Mon Sep 17 00:00:00 2001 From: Valery Klachkov Date: Fri, 27 Sep 2024 14:39:37 +0200 Subject: [PATCH] fix: set 644 mode for spec file (#4) * Set 444 permissions for spec file * Bump version --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/spec_builder.rs | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1b8128d..bfadcfa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -357,7 +357,7 @@ dependencies = [ [[package]] name = "baedeker" -version = "0.1.3" +version = "0.1.4" dependencies = [ "bip39", "chainql-core", diff --git a/Cargo.toml b/Cargo.toml index c6922ef..cb1247b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "baedeker" -version = "0.1.3" +version = "0.1.4" edition = "2021" description = "Substrate network orchestration framework" license = "MIT" diff --git a/src/spec_builder.rs b/src/spec_builder.rs index 6b10ed4..754e472 100644 --- a/src/spec_builder.rs +++ b/src/spec_builder.rs @@ -1,6 +1,7 @@ use std::{ - fs::{metadata, read_dir}, + fs::{self, metadata, read_dir}, io::Write, + os::unix::fs::PermissionsExt, path::PathBuf, process::{Command, Stdio}, result, @@ -166,6 +167,7 @@ impl SpecBuilder for DockerSpecBuilder { spec: String, ) -> Result> { let mut tempfile = Builder::new(); + tempfile.permissions(fs::Permissions::from_mode(0o644)); if let Some(prefix) = &spec_file_prefix { tempfile.prefix(prefix); }