mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Convert DirectoryForExes to LazyInitializableState
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
ce0c924c00
commit
1c4e620e38
2 files changed
+13
-13
No files matched your search
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { createLazyInitializableState } from "../initializable-state/create-lazy";
|
||||
import { appPathsInjectionToken } from "./token";
|
||||
|
||||
const directoryForExesInjectable = createLazyInitializableState({
|
||||
id: "directory-for-exes",
|
||||
init: (di) => di.inject(appPathsInjectionToken).get().exe,
|
||||
});
|
||||
|
||||
export default directoryForExesInjectable;
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { appPathsInjectionToken } from "../app-path-injection-token";
|
||||
|
||||
const directoryForExesInjectable = getInjectable({
|
||||
id: "directory-for-exes",
|
||||
instantiate: (di) => di.inject(appPathsInjectionToken).exe,
|
||||
});
|
||||
|
||||
export default directoryForExesInjectable;
|
||||
Reference in new issue
Block a user