mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
* Fix not using the users configured shell for sync Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix issue with use of userShellSetting in ShellSessions Signed-off-by: Sebastian Malton <sebastian@malton.name> Signed-off-by: Sebastian Malton <sebastian@malton.name>
21 lines
679 B
TypeScript
21 lines
679 B
TypeScript
/**
|
|
* 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 { computed } from "mobx";
|
|
import userInfoInjectable from "./user-info.injectable";
|
|
import userStoreInjectable from "./user-store.injectable";
|
|
|
|
const userShellSettingInjectable = getInjectable({
|
|
id: "user-shell-setting",
|
|
instantiate: (di) => {
|
|
const userStore = di.inject(userStoreInjectable);
|
|
const userInfo = di.inject(userInfoInjectable);
|
|
|
|
return computed(() => userStore.shell || userInfo.shell);
|
|
},
|
|
});
|
|
|
|
export default userShellSettingInjectable;
|