devbox icon indicating copy to clipboard operation
devbox copied to clipboard

Not able to install devbox using a script

Open pomdtr opened this issue 3 years ago • 2 comments

I'm trying to install devbox inside a docker container, however the --yes flag does not work:

curl -fsSL https://get.jetpack.io/devbox -o install-devbox.sh && chmod +x ./install-devbox.sh && ./install-devbox.sh --yes
=> ERROR [4/5] RUN curl -fsSL https://get.jetpack.io/devbox -o install-devbox.sh && chmod +x ./install-devbox.sh && ./install-de  1.1s
------
 > [4/5] RUN curl -fsSL https://get.jetpack.io/devbox -o install-devbox.sh && chmod +x ./install-devbox.sh && ./install-devbox.sh --yes:
#7 1.062 Devbox 📦 by jetpack.io
#7 1.062   Instant and predictable development environments and containers.
#7 1.062 
#7 1.062   This script downloads and installs the latest devbox binary.
#7 1.062 
#7 1.062 Confirm Installation Details
#7 1.062   Location:     /usr/local/bin/devbox
#7 1.062   Download URL: https://releases.jetpack.io/devbox
#7 1.062 
#7 1.062 ? Install devbox to /usr/local/bin (requires sudo)? [Y/n] ./install-devbox.sh: line 101: /dev/tty: No such device or address
#7 1.062 ✘ Error reading from prompt (re-run with '--yes' option if running in a script)
------
executor failed running [/bin/sh -c curl -fsSL https://get.jetpack.io/devbox -o install-devbox.sh && chmod +x ./install-devbox.sh && ./install-devbox.sh --yes]: exit code: 1

pomdtr avatar Oct 07 '22 10:10 pomdtr

@pomdtr thanks for reporting this. I'll take a look soon.

savil avatar Oct 07 '22 18:10 savil

Thanks ! It looks like the FORCE env variable should be used instead.

pomdtr avatar Oct 07 '22 18:10 pomdtr

This issue is stale because it has been open 30 days with no activity. Remove the stale label or add a comment, otherwise this issue will be closed in 5 days.

github-actions[bot] avatar Mar 13 '23 01:03 github-actions[bot]

Two ways to write the above command to get the desired effect are:

curl -fsSL https://get.jetpack.io/devbox -o install-devbox.sh && chmod +x ./install-devbox.sh && FORCE=1 ./install-devbox.sh

or

curl -fsSL https://get.jetpack.io/devbox -o install-devbox.sh && chmod +x ./install-devbox.sh && ./install-devbox.sh -f

Both options will automatically skip the prompt to install Devbox

Lagoja avatar Mar 14 '23 17:03 Lagoja