We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 90bb5b9 commit da0c8daCopy full SHA for da0c8da
crates/crates_io_og_image/src/lib.rs
@@ -251,6 +251,17 @@ impl OgImageGenerator {
251
// Pass input and output file paths
252
command.arg(&typ_file_path).arg(output_file.path());
253
254
+ // Clear environment variables to avoid leaking sensitive data
255
+ command.env_clear();
256
+
257
+ // Preserve environment variables needed for font discovery
258
+ if let Ok(path) = std::env::var("PATH") {
259
+ command.env("PATH", path);
260
+ }
261
+ if let Ok(home) = std::env::var("HOME") {
262
+ command.env("HOME", home);
263
264
265
let output = command.output().await;
266
let output = output.map_err(OgImageError::TypstNotFound)?;
267
0 commit comments