settingspec 0.1.1__tar.gz → 0.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {settingspec-0.1.1 → settingspec-0.1.2}/Cargo.lock +1 -1
- {settingspec-0.1.1 → settingspec-0.1.2}/Cargo.toml +1 -1
- {settingspec-0.1.1 → settingspec-0.1.2}/PKG-INFO +1 -1
- {settingspec-0.1.1 → settingspec-0.1.2}/src/cli.rs +8 -8
- {settingspec-0.1.1 → settingspec-0.1.2}/src/model.rs +10 -8
- {settingspec-0.1.1 → settingspec-0.1.2}/LICENSE-APACHE +0 -0
- {settingspec-0.1.1 → settingspec-0.1.2}/LICENSE-MIT +0 -0
- {settingspec-0.1.1 → settingspec-0.1.2}/README.md +0 -0
- {settingspec-0.1.1 → settingspec-0.1.2}/pyproject.toml +0 -0
- {settingspec-0.1.1 → settingspec-0.1.2}/src/envfile.rs +0 -0
- {settingspec-0.1.1 → settingspec-0.1.2}/src/error.rs +0 -0
- {settingspec-0.1.1 → settingspec-0.1.2}/src/filter.rs +0 -0
- {settingspec-0.1.1 → settingspec-0.1.2}/src/generator/common.rs +0 -0
- {settingspec-0.1.1 → settingspec-0.1.2}/src/generator/env.rs +0 -0
- {settingspec-0.1.1 → settingspec-0.1.2}/src/generator/javascript.rs +0 -0
- {settingspec-0.1.1 → settingspec-0.1.2}/src/generator/json.rs +0 -0
- {settingspec-0.1.1 → settingspec-0.1.2}/src/generator/lua.rs +0 -0
- {settingspec-0.1.1 → settingspec-0.1.2}/src/generator/mod.rs +0 -0
- {settingspec-0.1.1 → settingspec-0.1.2}/src/generator/python.rs +0 -0
- {settingspec-0.1.1 → settingspec-0.1.2}/src/generator/toml.rs +0 -0
- {settingspec-0.1.1 → settingspec-0.1.2}/src/generator/tree.rs +0 -0
- {settingspec-0.1.1 → settingspec-0.1.2}/src/generator/typescript.rs +0 -0
- {settingspec-0.1.1 → settingspec-0.1.2}/src/generator/yaml.rs +0 -0
- {settingspec-0.1.1 → settingspec-0.1.2}/src/lib.rs +0 -0
- {settingspec-0.1.1 → settingspec-0.1.2}/src/main.rs +0 -0
- {settingspec-0.1.1 → settingspec-0.1.2}/src/parser.rs +0 -0
- {settingspec-0.1.1 → settingspec-0.1.2}/src/profile.rs +0 -0
- {settingspec-0.1.1 → settingspec-0.1.2}/src/resolver.rs +0 -0
|
@@ -224,7 +224,7 @@ fn execute_run(ctx: &ExecutionContext, command_args: &[String]) -> Result<()> {
|
|
|
224
224
|
Ok(())
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
-
pub fn write_export_file(path: &Path, content: &str,
|
|
227
|
+
pub fn write_export_file(path: &Path, content: &str, _mode: u32) -> Result<()> {
|
|
228
228
|
if let Some(parent) = path.parent()
|
|
229
229
|
&& !parent.as_os_str().is_empty()
|
|
230
230
|
{
|
|
@@ -236,7 +236,7 @@ pub fn write_export_file(path: &Path, content: &str, mode: u32) -> Result<()> {
|
|
|
236
236
|
#[cfg(unix)]
|
|
237
237
|
{
|
|
238
238
|
use std::os::unix::fs::PermissionsExt;
|
|
239
|
-
let perms = std::fs::Permissions::from_mode(
|
|
239
|
+
let perms = std::fs::Permissions::from_mode(_mode);
|
|
240
240
|
let _ = std::fs::set_permissions(path, perms);
|
|
241
241
|
}
|
|
242
242
|
|
|
@@ -296,12 +296,12 @@ fn is_entry_in_gitignore(existing_content: &str, entry: &str) -> bool {
|
|
|
296
296
|
}
|
|
297
297
|
// In git, a pattern without '/' matches anywhere in the repository:
|
|
298
298
|
// E.g. if .gitignore has "settings.toml", it matches "subdir/settings.toml".
|
|
299
|
-
if !trimmed.starts_with('/')
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
299
|
+
if !trimmed.starts_with('/')
|
|
300
|
+
&& !norm_line.contains('/')
|
|
301
|
+
&& let Some((_, file_name)) = norm_entry.rsplit_once('/')
|
|
302
|
+
&& file_name == norm_line
|
|
303
|
+
{
|
|
304
|
+
return true;
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
307
|
false
|
|
@@ -155,14 +155,16 @@ where
|
|
|
155
155
|
D: Deserializer<'de>,
|
|
156
156
|
{
|
|
157
157
|
let val = i64::deserialize(deserializer)?;
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
158
|
+
if (0..=0o777).contains(&val) {
|
|
159
|
+
return Ok(val as u32);
|
|
160
|
+
}
|
|
161
|
+
let hex = format!("{:x}", val);
|
|
162
|
+
if let Ok(octal) = u32::from_str_radix(&hex, 8)
|
|
163
|
+
&& (0..=0o7777).contains(&octal)
|
|
164
|
+
{
|
|
165
|
+
return Ok(octal);
|
|
166
|
+
}
|
|
167
|
+
Ok(0o600)
|
|
166
168
|
}
|
|
167
169
|
|
|
168
170
|
/// A field that accepts either a boolean toggle or a string value in TOML.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|