Source app specific bashrc

This commit is contained in:
Girish Ramakrishnan
2021-05-03 23:08:48 -07:00
parent d072682e82
commit 445325453b

View File

@@ -149,7 +149,7 @@ angular.module('Application').controller('TerminalController', ['$scope', '$tran
function createTerminalSocket() {
try {
// websocket cannot use relative urls
var cmd = JSON.stringify([ '/bin/bash', '--norc' ]);
var cmd = JSON.stringify([ '/bin/bash', '--rcfile', '/app/data/.bashrc' ]);
var url = Client.apiOrigin.replace('https', 'wss') + '/api/v1/apps/' + $scope.selected.value + '/execws?tty=true&rows=' + $scope.terminal.rows + '&columns=' + $scope.terminal.cols + '&access_token=' + Client.getToken() + '&cmd=' + cmd;
$scope.terminalSocket = new WebSocket(url);
$scope.terminal.loadAddon(new AttachAddon.AttachAddon($scope.terminalSocket));