fix(Service Codefever): read env path from config file

This commit is contained in:
cubic
2022-04-14 14:15:45 +08:00
parent cc879a4237
commit 683adfaa42

View File

@@ -109,9 +109,11 @@ function addAuthorizedKey(array $data)
return FALSE;
}
global $config;
$sshGateway = dirname(BASE_PATH) . '/ssh-gateway/shell/main';
$authorized = [
"command=\"PATH=\$PATH:/usr/local/git/bin && {$sshGateway} \$SSH_ORIGINAL_COMMAND {$data['user']}\",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty",
"command=\"PATH=\$PATH:" . dirname($config['cli']['git']) . " && {$sshGateway} \$SSH_ORIGINAL_COMMAND {$data['user']}\",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty",
$data['type'],
$data['key'],
$data['name'],