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

running twice in an ssh session #7

Open
enyaWecurB opened this issue Aug 31, 2021 · 1 comment
Open

running twice in an ssh session #7

enyaWecurB opened this issue Aug 31, 2021 · 1 comment

Comments

@enyaWecurB
Copy link

enyaWecurB commented Aug 31, 2021

First of all, thank you so much for your work here - it's awesome and really super helpful! Practically, I use it all day long while programming.
I'm running vscodium on unix, trying to tinker on a windows server. With my local environment it works absolutely fine, but the code is executed twice during an ssh session on the win server.

I followed your settings:
"command": "ssh -i ~/.ssh/id_rsa deloyer@tinke.run -t 'cd C:/path/to/project && php artisan tinker'"

If I call this line directly from a terminal, tinker is executed remotely and no duplicates are printed (everything normal).
The duplications are also shown already shifted during initialization with tinkerun, like:

Tinkerun is Initializing...
<13 -t 'cd C:/path/to/proj                                      ect/portal && php artisan tinker'ojec

Maybe there is a problem with the remote connection, like connecting twice, because the run-command works properly. IMHO. Maybe tinkerun need's the new bash '[...] php artisan tinker; bash --login'? I don't know.
I'm already looking in your code, but I guess you'll find it quicker than me.
hope it helps! Let me know if I can help you with further informations and thank you again for you great work.

Edit: another output with random strings - there are some duplicate lines everytime, but not always as clear to differ as here.

=> Illuminate\Support\Collection {#5088
     all: [
       "F01P6NGhc3paC7LT4BIDfyouh2BGnLQN",
       "0CTbTn79hNaBfcHcQlhoWPPw6bvMlrAi",
       "Z225MZO8qAQ1RAtlaiQAzeZlNxpFH8ku",
       "ei7GLlkoXSqpkzCTl3JG1hZW1XrCkNo1",
       "mH5sE39dLo6Pmk34X4vCpqVk7ItIPfKU",
     ],
   }
       "mH5sE39dLo6Pmk34X4vCpqVk7ItIPfKU", 
     ],
   }
@billyct
Copy link
Member

billyct commented Sep 1, 2021

@enyaWecurB
I checked the code, and I think it doesn't run twice.
it may be caused by the filterOutput function. it used for filtering the clear Laravel Tinker output from pty.
https://github.com/tinkerun/tinkerun-vscode/blob/master/src/utils.ts#L27-L60

or caused by I have not set the cols and rows option.
https://github.com/tinkerun/tinkerun-vscode/blob/master/src/terminal.ts#L110-L114

Maybe some encodings returned from the windows server are not the same as those returned by the Unix server. it's a little hard for me to testing with the windows server 🤣

https://github.com/tinkerun/tinkerun-vscode#how-to-hand-back-to-tinker-after-running-code
can you try typing the Enter in the output panel, and press the Up arrow to rerun the code you last run. then check if the output is correct?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants