Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alias tmate #1905

Merged
merged 1 commit into from May 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/travis/build/bash/travis_debug.bash
Expand Up @@ -8,14 +8,15 @@ export ANSI_YELLOW="\033[33;1m"
export ANSI_BLUE="\033[34;1m"
export ANSI_RESET="\033[0m"
export ANSI_CLEAR="\033[0K"
export TMATE_SOCKET='/tmp/tmate.sock'

travis_debug_warn() {
echo -e "${ANSI_YELLOW}travis_debug: $1${ANSI_RESET}" 1>&2
}

main() {
local QUIET TMATE TMATE_MSG
export TMATE="tmate -S /tmp/tmate.sock"
export TMATE="tmate -S ${TMATE_SOCKET}"

while [[ $# -gt 0 ]]; do
case "$1" in
Expand All @@ -38,6 +39,7 @@ main() {

"
echo -en "${TMATE_MSG}" >"${TRAVIS_HOME}/.travis/debug_help"
echo "alias tmate='/usr/bin/tmate -S ${TMATE_SOCKET}' >> ${TRAVIS_HOME}/.bashrc"
sync
$TMATE new-session -d "cat ${TRAVIS_HOME}/.travis/debug_help; /bin/bash -l"
$TMATE wait tmate-ready
Expand Down