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:
authored and GitHub committed 2022-09-08 13:57:11 -04:00
1 parent d4bb416f99
commit ec78080d99
38 files changed
+11090 -10160

No files matched your search

@@ -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 });
},
});
+7 -4
View File
@@ -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,