-
-
Notifications
You must be signed in to change notification settings - Fork 324
Support user own tmate server #93
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
Conversation
dscho
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume you tested this?
Also, since this is relevant only when starting the session, we could potentially pass the custom settings via the command-line, yes?
lib/index.js
Outdated
| await execShellCommand(`echo 'set +e' >/tmp/tmate.bashrc`); | ||
| const setDefaultCommand = `set-option -g default-command "bash --rcfile /tmp/tmate.bashrc" \\;`; | ||
|
|
||
| const tmateConfPath = external_path_default().join(external_os_default().homedir(), ".tmate.conf") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use /tmp/tmate.conf?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/tmp directory hasn't not a not UNIX-like OS (e.g. Windows). So I used ${HOME} dir.
But I found that this action uses MSYS2 and MSYS2 can uses /tmp.
I will change to use /tmp/tmate.conf.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, since this is relevant only when starting the session, we could potentially pass the custom settings via the command-line, yes?
I see. I will change to add setDefaultCommand.
lib/index.js
Outdated
| const tmateConfPath = external_path_default().join(external_os_default().homedir(), ".tmate.conf") | ||
| if (core.getInput("tmate-server-host") !== "") { | ||
| core.debug("Configure your tmate server") | ||
| await execShellCommand(`echo 'set -g tmate-server-host ${core.getInput("tmate-server-host")}' >> ${tmateConfPath}`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to use $HOME/.tmate.conf, you'll have to quote the path.
Co-authored-by: Johannes Schindelin <[email protected]>
|
@dscho I fixed. Please review again! |
Co-authored-by: Max Schmitt <[email protected]>
Hi, I found this action works very well! Thank you for creating this! 😊
Now,
action-tmateonly supports usingssh.tmate.io.This change adds inputs about using other tmate servers.
I referred "Host your own tmate servers" in https://tmate.io/.