mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Pre-Validate kubeconfig before making available in Lens (#1078)
This commit is contained in:
1 parent
23c9255b9a
commit
e560baa2d0
5 files changed
+244
-52
No files matched your search
@@ -62,9 +62,11 @@ export class AddCluster extends React.Component {
|
||||
this.kubeConfigPath = filePath;
|
||||
userStore.kubeConfigPath = filePath; // save to store
|
||||
} catch (err) {
|
||||
Notifications.error(
|
||||
<div>Can't setup <code>{filePath}</code> as kubeconfig: {String(err)}</div>
|
||||
);
|
||||
if (!userStore.isDefaultKubeConfigPath) {
|
||||
Notifications.error(
|
||||
<div>Can't setup <code>{filePath}</code> as kubeconfig: {String(err)}</div>
|
||||
);
|
||||
}
|
||||
|
||||
if (throwError) {
|
||||
throw err;
|
||||
|
||||
Reference in new issue
Block a user