Coder Social home page Coder Social logo

Windows support about sake HOT 8 OPEN

alajmo avatar alajmo commented on August 19, 2024
Windows support

from sake.

Comments (8)

alajmo avatar alajmo commented on August 19, 2024 3

It's in the backlog, but I'll make sure to bump it up since there seems to be some demand. What's the preferred shell for windows, powershell?

from sake.

codenoid avatar codenoid commented on August 19, 2024 1

Anyway @alajmo , Is it possible to replace os-spesific command with this library melbahja/goph

from sake.

alajmo avatar alajmo commented on August 19, 2024 1

It's because it gets pretty complex when you use RequestPty on the remote hosts. You're left with manually handling all signals, and fixing key presses, for instance, Ctrl + L doesn't clear the screen but prints out ^L, key arrows don't work as you expect, and a lot more things.

So, it's easier to just delegate it to the users ssh (which almost everyone has anyway, and you might even have some configs associated with your ssh in ~/.ssh/config). One more note, we also use unix.Exec to replace the current process, instead of creating a sub-process, where sake commands normally run.

This is a good article https://dev.to/napicella/linux-terminals-tty-pty-and-shell-part-2-2cb2 to learn more about tty, pty and linux terminals.

from sake.

alajmo avatar alajmo commented on August 19, 2024 1

Release v0.10.1 now supports

  • overriding the current shell (with the default shell being PowerShell for windows), see sakecli.com/recipes. I haven't tested it thoroughly, so I'll keep this issue open until I've tested the functionality with a remote windows server
  • running sake on windows (released Windows build)

from sake.

gabriel-vanca avatar gabriel-vanca commented on August 19, 2024

Powershell Core, yes. It's cross platform so could be used on the Linux machines too technically.

from sake.

codenoid avatar codenoid commented on August 19, 2024

Powershell +1

from sake.

alajmo avatar alajmo commented on August 19, 2024

I'll look into it after I'm done with adding some needed unit and integrations tests (not sure how I'll test the remote window server, since I'm running Linux, but perhaps I could do it with Github actions or there's some lightweight virtualization software I could take advantage of).

Concerning goph, I've used some of their code already (their known_hosts logic mainly), but since SSH is central to sake, I think it's better to use golangs std lib rather than a 3rd party lib. This could change in the future though

from sake.

codenoid avatar codenoid commented on August 19, 2024

Sorry for my negligence, I was seen this function and I'm thinking, why is using user's ssh command, why not using something embed/built-in

core/run/exec.go#L403

from sake.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.