mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Make opening of release details work properly when release has resources without namespace (#6088)
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com> Co-authored-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
38 files changed
+11090
-10160
No files matched your search
+1
-2
@@ -16,8 +16,7 @@ const navigateToHelmReleasesInjectable = getInjectable({
|
||||
const navigateToRoute = di.inject(navigateToRouteInjectionToken);
|
||||
const route = di.inject(helmReleasesRouteInjectable);
|
||||
|
||||
return (parameters) =>
|
||||
navigateToRoute(route, { parameters });
|
||||
return (parameters) => navigateToRoute(route, { parameters });
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -3,20 +3,23 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import type { ExecFileOptions } from "child_process";
|
||||
import { execFile } from "child_process";
|
||||
import { promisify } from "util";
|
||||
|
||||
export type ExecFile = (filePath: string, args: string[]) => Promise<string>;
|
||||
export type ExecFile = (filePath: string, args: string[], options: ExecFileOptions) => Promise<string>;
|
||||
|
||||
const execFileInjectable = getInjectable({
|
||||
id: "exec-file",
|
||||
|
||||
instantiate: (): ExecFile => async (filePath, args) => {
|
||||
instantiate: (): ExecFile => {
|
||||
const asyncExecFile = promisify(execFile);
|
||||
|
||||
const result = await asyncExecFile(filePath, args);
|
||||
return async (filePath, args, options) => {
|
||||
const result = await asyncExecFile(filePath, args, options);
|
||||
|
||||
return result.stdout;
|
||||
return result.stdout;
|
||||
};
|
||||
},
|
||||
|
||||
causesSideEffects: true,
|
||||
|
||||
Reference in new issue
Block a user