windows: Make collab run on Windows (#23117)

I’ve also updated the documentation in
`development\local-collaboration.md` and
`docs\src\development\windows.md`.

Testing collab on my Windows machine:

![屏幕截图 2025-01-14
162021](https://github.com/user-attachments/assets/28b4a36a-e156-4012-981a-5d0a23dcc613)


Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
This commit is contained in:
张小白
2025-01-17 09:39:13 +02:00
committed by GitHub
co-authored by Marshall Bowers
parent b1375ab946
commit 70db427fc8
14 changed files with 176 additions and 197 deletions
+5 -1
View File
@@ -2,7 +2,11 @@ use collab::env::get_dotenv_vars;
fn main() -> anyhow::Result<()> {
for (key, value) in get_dotenv_vars(".")? {
println!("export {}=\"{}\"", key, value);
if option_env!("POWERSHELL").is_some() {
println!("$env:{}=\"{}\"", key, value);
} else {
println!("export {}=\"{}\"", key, value);
}
}
Ok(())
}