-
-
Notifications
You must be signed in to change notification settings - Fork 75
Open
Description
I am running a container, which uses a redhat image based on linux/amd64.
The docker desktop version is 4.34.2 (167172)
docker engine version: 27.2.0
Use Rosetta for x86_64/amd64 emulation on Apple Silicon is enabled.
When I want to run the test cases through the shellspec, I get the error
Not found specificed shell: /run/rosetta/rosetta /bin/sh /bin/sh
It seems like the shellspec would like to use the host's environment (which is my M3 macbook pro) instead of the container's (--platform linux/amd64).
I did a workaround, but permanent or better solution would be much appreciated:
# shell detection
{
if [ "${SHELLSPEC_SHELL:-auto}" = "auto" ]; then
# shellcheck disable=SC2039,SC3047
if [ "$SHELLSPEC_KCOV" ] && ! (trap '' DEBUG) 2>/dev/null; then
for shell in sh bash ksh zsh :; do
"$shell" -c "trap '' DEBUG" 2>/dev/null && break
done
[ "$shell" = : ] && abort "Current shell is not compatible with Kcov."
warn "Current shell is not compatible with Kcov. Using '$shell' instead."
else
shell=$(current_shell "$0" "$$")
fi
if [ ! "$shell" ] && shell="sh"; then
warn "Failed to detect the current shell," \
"because the ps command does not exist or not compatible."
warn "Using 'sh' instead. You can specify the shell with --shell option."
fi
SHELLSPEC_SHELL=$shell
fi
After # shell detection comment I have just added:
SHELLSPEC_SHELL=usr/bin/sh
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels