Merge pull request #105 from cfsnyder/main
Fix compatibility issues with alternative GHA cache implementation
This commit is contained in:
commit
6a5abbf3bb
|
@ -116,7 +116,7 @@ pub struct FileAllocation(CacheId);
|
||||||
/// The ID of a cache.
|
/// The ID of a cache.
|
||||||
#[derive(Debug, Clone, Copy, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Copy, Serialize, Deserialize)]
|
||||||
#[serde(transparent)]
|
#[serde(transparent)]
|
||||||
struct CacheId(pub i32);
|
struct CacheId(pub i64);
|
||||||
|
|
||||||
/// An API error.
|
/// An API error.
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
|
@ -543,10 +543,13 @@ impl Api {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn construct_url(&self, resource: &str) -> String {
|
fn construct_url(&self, resource: &str) -> String {
|
||||||
format!(
|
let mut url = self.credentials.cache_url.clone();
|
||||||
"{}/_apis/artifactcache/{}",
|
if !url.ends_with('/') {
|
||||||
self.credentials.cache_url, resource
|
url.push('/');
|
||||||
)
|
}
|
||||||
|
url.push_str("_apis/artifactcache/");
|
||||||
|
url.push_str(resource);
|
||||||
|
url
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue