mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-09-22 21:30:44 +02:00
* fix(updater): Fix endpoint string replacements, fixes #655 * fmt
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"updater": "patch"
|
||||||
|
---
|
||||||
|
|
||||||
|
The plugin now correctly replaces `arch`, `current_version` and `target` again.
|
||||||
@@ -258,9 +258,13 @@ impl Updater {
|
|||||||
// the URL will be generated dynamically
|
// the URL will be generated dynamically
|
||||||
let url: Url = url
|
let url: Url = url
|
||||||
.to_string()
|
.to_string()
|
||||||
.replace("{{current_version}}", &self.current_version.to_string())
|
// url::Url automatically url-encodes the string
|
||||||
.replace("{{target}}", &self.target)
|
.replace(
|
||||||
.replace("{{arch}}", self.arch)
|
"%7B%7Bcurrent_version%7D%7D",
|
||||||
|
&self.current_version.to_string(),
|
||||||
|
)
|
||||||
|
.replace("%7B%7Btarget%7D%7D", &self.target)
|
||||||
|
.replace("%7B%7Barch%7D%7D", self.arch)
|
||||||
.parse()?;
|
.parse()?;
|
||||||
|
|
||||||
let mut request = Client::new().get(url).headers(headers.clone());
|
let mut request = Client::new().get(url).headers(headers.clone());
|
||||||
|
|||||||
Reference in New Issue
Block a user