From dd29c507cf510f4c53018fafaa61a903654d69b1 Mon Sep 17 00:00:00 2001 From: Vitaliy Gulyy Date: Thu, 8 Aug 2024 15:04:46 +0300 Subject: [PATCH] fix: apply .bashrc when running a task (#395) Signed-off-by: vitaliy-guliy --- code/extensions/che-terminal/src/machine-exec-client.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/extensions/che-terminal/src/machine-exec-client.ts b/code/extensions/che-terminal/src/machine-exec-client.ts index 100abc80fc7..eac30e2c902 100644 --- a/code/extensions/che-terminal/src/machine-exec-client.ts +++ b/code/extensions/che-terminal/src/machine-exec-client.ts @@ -136,6 +136,10 @@ export class MachineExecClient implements vscode.Disposable { * @returns a TerminalSession object to manage the created terminal session */ async createTerminalSession(component: string, commandLine?: string, workdir?: string, columns: number = 80, rows: number = 24): Promise { + if (commandLine) { + commandLine = "test -f ${HOME}/.bashrc >> /dev/null 2>&1 && source ${HOME}/.bashrc >> /dev/null 2>&1;" + commandLine; + } + const createTerminalSessionCall = { identifier: { machineName: component