mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Move ownership and enabling tracking into cluster store
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
b066fb3527
commit
29dadd478a
16 files changed
+182
-112
No files matched your search
@@ -28,11 +28,7 @@ class KubectlDownloader {
|
||||
resolveWithFullResponse: true
|
||||
}).catch((error) => { console.log(error); });
|
||||
|
||||
if (response.headers["etag"]) {
|
||||
return response.headers["etag"].replace(/"/g, "");
|
||||
}
|
||||
|
||||
return "";
|
||||
return response.headers?.["etag"]?.replace(/"/g, "") ?? "";
|
||||
}
|
||||
|
||||
public async checkBinary() {
|
||||
@@ -87,7 +83,7 @@ class KubectlDownloader {
|
||||
throw(error);
|
||||
});
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
file.on("close", () => {
|
||||
console.log("kubectl binary download closed");
|
||||
fs.chmod(this.path, 0o755, (err) => {
|
||||
@@ -116,4 +112,3 @@ downloads.forEach((dlOpts) => {
|
||||
console.log(`Downloading: ${JSON.stringify(dlOpts)}`);
|
||||
downloader.downloadKubectl().then(() => downloader.checkBinary().then(() => console.log("Download complete")));
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user