You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to automate some operations using lima with shell scripts. Just for my own convenience and to be able to quickly demonstrate things I wanted to put script on github pages and just nicely curl to sh, like one does with k3s [1]
when I hit quite unexpected issue.
It can be reproduced with simple script, let's call it script.sh
This issue can be reproduced even without using limactl, by starting ssh with stdin not being a terminal.
$ echo""|ssh -i "/Users/norio/.lima/_config/user" -o StrictHostKeyChecking=no -t -p 49450 127.0.0.1 -- 'sudo apt-get update'Pseudo-terminal will not be allocated because stdin is not a terminal.Hit:1 http://deb.debian.org/debian bookworm InReleaseHit:2 https://download.docker.com/linux/ubuntu noble InReleaseHit:3 http://ports.ubuntu.com/ubuntu-ports noble InReleaseHit:4 http://ports.ubuntu.com/ubuntu-ports noble-updates InReleaseHit:5 http://ports.ubuntu.com/ubuntu-ports noble-backports InReleaseHit:6 http://ports.ubuntu.com/ubuntu-ports noble-security InReleaseReading package lists...
The issue does not reproduce when running sudo apt-get update directly inside the VM with stdin not being a terminal, so I believe the cause is related to ssh.
Description
I wanted to automate some operations using lima with shell scripts. Just for my own convenience and to be able to quickly demonstrate things I wanted to put script on github pages and just nicely
curl
tosh
, like one does withk3s
[1]when I hit quite unexpected issue.
It can be reproduced with simple script, let's call it
script.sh
If I run it directly it works fine:
but if I try to pipe it to
sh
, like I would do if I was curl-ing it in with one-liners i terminates at the end ofapt-get update
commandcat script.sh | sh Hit:1 http://ports.ubuntu.com/ubuntu-ports oracular InRelease Hit:2 http://ports.ubuntu.com/ubuntu-ports oracular-updates InRelease Hit:3 http://ports.ubuntu.com/ubuntu-ports oracular-backports InRelease Hit:4 http://ports.ubuntu.com/ubuntu-ports oracular-security InRelease Reading package lists...
Notice lack of
Done
in "Reading package lists... Done".Lima: 1.0.1
Macos: 15.1.1
[1]
curl -sfL https://get.k3s.io | sh -s - --disable servicelb --disable traefik
The text was updated successfully, but these errors were encountered: