tfutils / tfenv

Terraform version manager
MIT License
4.5k stars 454 forks source link

Manual installation broke. tfenv 2.2.2-82-g82fe3ce #284

Closed Samusia closed 3 years ago

Samusia commented 3 years ago

Everything worked fine on Friday, but now it doesn't

tfenv 2.2.2-82-g82fe3ce

How to reproduce:

docker run -it --rm openresty/openresty:1.19.3.2-3-alpine-fat /bin/bash
apk add git
git clone https://github.com/tfutils/tfenv.git ~/.tfenv

~/.tfenv/bin/tfenv install 0.11.14
Installing Terraform v0.11.14
/bin/mktemp: unrecognized option: tmpdir
BusyBox v1.28.4 (2018-12-31 18:05:13 UTC) multi-call binary.

Usage: mktemp [-dt] [-p DIR] [TEMPLATE]

Create a temporary file with name based on TEMPLATE and print its name.
TEMPLATE must end with XXXXXX (e.g. [/dir/]nameXXXXXX).
Without TEMPLATE, -t tmp.XXXXXX is assumed.

    -d  Make directory, not file
    -q  Fail silently on errors
    -t  Prepend base directory name to TEMPLATE
    -p DIR  Use DIR as a base directory (implies -t)
    -u  Do not create anything; print a name

Base directory is: -p DIR, else $TMPDIR, else /tmp
Unable to create temporary download directory in /
~/.tfenv/bin/tfenv --version
tfenv 2.2.2-82-g82fe3ce

I guess the problem might be here: https://github.com/tfutils/tfenv/blob/31b8ed6c8130af90745d133d0db68ccfa2d20ceb/libexec/tfenv-install#L136-L142

asahadevops commented 3 years ago

It is also breaking our pipeline. Is there any workaround for it? @Zordrak I think it's because of the last commit you made yesterday. https://github.com/tfutils/tfenv/commit/a4d0e2ea25dac5db476682ac277ad56163d827a3