use remote cli when in remote terminal (#150372)

This commit is contained in:
Martin Aeschlimann
2022-05-25 16:21:16 +02:00
committed by GitHub
parent 986ef1c76d
commit 07655f3a23
3 changed files with 23 additions and 4 deletions

View File

@@ -3,6 +3,15 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# when run in remote terminal, use the remote cli
if [ -n "$VSCODE_IPC_HOOK_CLI" ]; then
REMOTE_CLI="$(which -a '@@APPNAME@@' | grep /remote-cli/)"
if [ -n "$REMOTE_CLI" ]; then
"$REMOTE_CLI" "$@"
exit $?
fi
fi
function app_realpath() {
SOURCE=$1
while [ -h "$SOURCE" ]; do