mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-13 04:28:41 -09:00
25 lines
415 B
TypeScript
25 lines
415 B
TypeScript
export const getFallBackShellConfig = (
|
|
shell: string,
|
|
shellArgs: string[],
|
|
defaultShell: string,
|
|
defaultShellArgs: string[]
|
|
): {
|
|
shell: string;
|
|
shellArgs: string[];
|
|
} | null => {
|
|
if (shellArgs.length > 0) {
|
|
return {
|
|
shell,
|
|
shellArgs: []
|
|
};
|
|
}
|
|
|
|
if (shell != defaultShell) {
|
|
return {
|
|
shell: defaultShell,
|
|
shellArgs: defaultShellArgs
|
|
};
|
|
}
|
|
|
|
return null;
|
|
};
|