-
-
Notifications
You must be signed in to change notification settings - Fork 36
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
In https://github.com/lando/core/blob/6e2b0a5bbae626fe4ce57a501d8cd02cad9e4403/scripts/exec-multiliner.sh there's a mktemp usage. During service reboots and installs, I observed that some services output "mktemp: Invalid argument".
It appears that BusyBox's mktemp (as used by some Alpine docker images, as of BusyBox v1.36.1) is more particular about the template string supplied; when using BusyBox's mktemp -
- Placeholder
Xs must be the final component of the template - A template string must have a minimum of 6 placeholder
Xs - A maximum of six placeholder
Xs will be substituted
# 1. Placeholder X must be the final characters.
78c07b93ca33:~$ mktemp /tmp/lando.XXXXXX.sh
mktemp: Invalid argument
# 2. Five X are invalid.
78c07b93ca33:~$ mktemp -t lando.XXXXX
mktemp: Invalid argument
# 2. Six X are valid.
78c07b93ca33:~$ mktemp -t lando.XXXXXX
/tmp/lando.aAeCPF
# 3. More than six characters are permitted, but only six are used.
78c07b93ca33:~$ mktemp /tmp/lando.XXXXXXXX
/tmp/lando.XXaPHOPO
78c07b93ca33:~$ mktemp /tmp/lando.XXXXXXXX
/tmp/lando.XXhCKdcm
- mktemp version tested: BusyBox v1.36.1 (2024-06-10 07:11:47 UTC) multi-call binary.
This bug is probably harmless; the multiline execs seem to function okay, outputting an error from the first mktemp with template, then calling mktemp without parameters.
I will propose a small change that permits this to work as intended (with a modified template string), and eliminates the error output.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working