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:
parent
ce0c924c00
commit
1c4e620e38
13
src/common/app-paths/directory-for-exes.injectable.ts
Normal file
13
src/common/app-paths/directory-for-exes.injectable.ts
Normal file
@ -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;
|
||||
Loading…
Reference in New Issue
Block a user