mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Make the USERPROFILE use on windows visible
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
93d2caa6ca
commit
86687f8b71
@ -189,7 +189,9 @@ export abstract class ShellSession {
|
||||
} catch {}
|
||||
}
|
||||
|
||||
return env.HOME;
|
||||
return isWindows
|
||||
? env.USERPROFILE
|
||||
: env.HOME;
|
||||
}
|
||||
|
||||
protected async openShellProcess(shell: string, args: string[], env: Record<string, string>) {
|
||||
|
||||
@ -79,7 +79,7 @@ export function TerminalSettings({ entity }: EntitySettingViewProps) {
|
||||
|
||||
return (
|
||||
<section>
|
||||
<components.ClusterHomeDirSetting cluster={cluster} />
|
||||
<components.ClusterLocalTerminalSetting cluster={cluster} />
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
@ -30,13 +30,14 @@ import { Notifications } from "../../notifications";
|
||||
import { resolveTilde } from "../../../utils";
|
||||
import { Icon } from "../../icon";
|
||||
import { PathPicker } from "../../path-picker";
|
||||
import { isWindows } from "../../../../common/vars";
|
||||
|
||||
interface Props {
|
||||
cluster: Cluster;
|
||||
}
|
||||
|
||||
@observer
|
||||
export class ClusterHomeDirSetting extends React.Component<Props> {
|
||||
export class ClusterLocalTerminalSetting extends React.Component<Props> {
|
||||
@observable directory = "";
|
||||
@observable defaultNamespace = "";
|
||||
|
||||
@ -140,7 +141,7 @@ export class ClusterHomeDirSetting extends React.Component<Props> {
|
||||
value={this.directory}
|
||||
onChange={this.onChangeTerminalCWD}
|
||||
onBlur={this.saveCWD}
|
||||
placeholder="$HOME"
|
||||
placeholder={isWindows ? "$USERPROFILE" : "$HOME"}
|
||||
iconRight={
|
||||
<>
|
||||
{
|
||||
@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
export * from "./cluster-accessible-namespaces";
|
||||
export * from "./cluster-home-dir-setting";
|
||||
export * from "./cluster-local-terminal-settings";
|
||||
export * from "./cluster-kubeconfig";
|
||||
export * from "./cluster-metrics-setting";
|
||||
export * from "./cluster-name-setting";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user