mirror of https://github.com/Tim-Paik/neutauri.git
fix: initialization_script now read the corresponding file instead of directly executing
This commit is contained in:
parent
5217d374aa
commit
7555958627
|
@ -284,7 +284,13 @@ impl Config {
|
||||||
Some(path) => fs::read_to_string(path.as_path()).ok(),
|
Some(path) => fs::read_to_string(path.as_path()).ok(),
|
||||||
None => None,
|
None => None,
|
||||||
},
|
},
|
||||||
initialization_script: self.initialization_script.clone(),
|
initialization_script: {
|
||||||
|
if let Some(script_path) = &self.initialization_script {
|
||||||
|
fs::read_to_string(Path::new(script_path)).ok()
|
||||||
|
} else {
|
||||||
|
None
|
||||||
|
}
|
||||||
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue