User Input (#119)

Port the User Input feature from the previous version of the app. This
is currently being used to verify a few different prompts for ssh.
This commit is contained in:
Sylvie Crowe
2024-07-18 15:21:33 -07:00
committed by GitHub
parent 01d61dabec
commit f3743f90ec
16 changed files with 438 additions and 126 deletions
+2 -1
View File
@@ -17,6 +17,7 @@ import (
"strings"
"sync"
"syscall"
"time"
"github.com/creack/pty"
"github.com/wavetermdev/thenextwave/pkg/remote"
@@ -114,7 +115,7 @@ func checkCwd(cwd string) error {
var userHostRe = regexp.MustCompile(`^([a-zA-Z0-9][a-zA-Z0-9._@\\-]*@)?([a-z0-9][a-z0-9.-]*)(?::([0-9]+))?$`)
func StartRemoteShellProc(termSize TermSize, cmdStr string, cmdOpts CommandOptsType, remoteName string) (*ShellProc, error) {
ctx, cancelFunc := context.WithCancel(context.Background())
ctx, cancelFunc := context.WithTimeout(context.Background(), 60*time.Second)
defer cancelFunc()
var shellPath string