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 {}
|
} catch {}
|
||||||
}
|
}
|
||||||
|
|
||||||
return env.HOME;
|
return isWindows
|
||||||
|
? env.USERPROFILE
|
||||||
|
: env.HOME;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async openShellProcess(shell: string, args: string[], env: Record<string, string>) {
|
protected async openShellProcess(shell: string, args: string[], env: Record<string, string>) {
|
||||||
|
|||||||
@ -79,7 +79,7 @@ export function TerminalSettings({ entity }: EntitySettingViewProps) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<section>
|
<section>
|
||||||
<components.ClusterHomeDirSetting cluster={cluster} />
|
<components.ClusterLocalTerminalSetting cluster={cluster} />
|
||||||
</section>
|
</section>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -30,13 +30,14 @@ import { Notifications } from "../../notifications";
|
|||||||
import { resolveTilde } from "../../../utils";
|
import { resolveTilde } from "../../../utils";
|
||||||
import { Icon } from "../../icon";
|
import { Icon } from "../../icon";
|
||||||
import { PathPicker } from "../../path-picker";
|
import { PathPicker } from "../../path-picker";
|
||||||
|
import { isWindows } from "../../../../common/vars";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
cluster: Cluster;
|
cluster: Cluster;
|
||||||
}
|
}
|
||||||
|
|
||||||
@observer
|
@observer
|
||||||
export class ClusterHomeDirSetting extends React.Component<Props> {
|
export class ClusterLocalTerminalSetting extends React.Component<Props> {
|
||||||
@observable directory = "";
|
@observable directory = "";
|
||||||
@observable defaultNamespace = "";
|
@observable defaultNamespace = "";
|
||||||
|
|
||||||
@ -140,7 +141,7 @@ export class ClusterHomeDirSetting extends React.Component<Props> {
|
|||||||
value={this.directory}
|
value={this.directory}
|
||||||
onChange={this.onChangeTerminalCWD}
|
onChange={this.onChangeTerminalCWD}
|
||||||
onBlur={this.saveCWD}
|
onBlur={this.saveCWD}
|
||||||
placeholder="$HOME"
|
placeholder={isWindows ? "$USERPROFILE" : "$HOME"}
|
||||||
iconRight={
|
iconRight={
|
||||||
<>
|
<>
|
||||||
{
|
{
|
||||||
@ -20,7 +20,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
export * from "./cluster-accessible-namespaces";
|
export * from "./cluster-accessible-namespaces";
|
||||||
export * from "./cluster-home-dir-setting";
|
export * from "./cluster-local-terminal-settings";
|
||||||
export * from "./cluster-kubeconfig";
|
export * from "./cluster-kubeconfig";
|
||||||
export * from "./cluster-metrics-setting";
|
export * from "./cluster-metrics-setting";
|
||||||
export * from "./cluster-name-setting";
|
export * from "./cluster-name-setting";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user