Compare commits
1 Commits
0d120588dc
...
0ed045d73e
| Author | SHA1 | Date | |
|---|---|---|---|
| 0ed045d73e |
@@ -53,9 +53,8 @@ impl Server {
|
||||
fs::create_dir_all(path).with_context(|| "creating directory")?;
|
||||
self.rewriter.rewrite_folder(&self.template_dir, path).with_context(|| "generating configs")?;
|
||||
// Finally, symlink it to the output folder; only support Linux for now
|
||||
let symlink = Path::new(&self.workspace_dir).join("symlink.tmp");
|
||||
std::os::unix::fs::symlink(path, &symlink).with_context(|| "creating symlink")?;
|
||||
fs::rename(symlink, &self.config_dir).with_context(|| "renaming symlink")?;
|
||||
fs::remove_file(&self.config_dir).with_context(|| "removing old symlink")?;
|
||||
std::os::unix::fs::symlink(path, &self.config_dir).with_context(|| "updating symlink")?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user