mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-12 08:05:44 +00:00
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
12 lines
436 B
Rust
12 lines
436 B
Rust
fn main() {
|
|
// rust-embed requires the embedded folder to exist at compile time.
|
|
// When building without a prior frontend build, create the directory
|
|
// so the derive macro doesn't panic.
|
|
let dir = std::env::var("FRONTEND_BUILD_DIR")
|
|
.unwrap_or_else(|_| "../../frontend/build/".to_string());
|
|
let path = std::path::Path::new(&dir);
|
|
if !path.exists() {
|
|
std::fs::create_dir_all(path).ok();
|
|
}
|
|
}
|