Closed umlaeute closed 11 months ago
just for completeness sake: the original problem i'was trying to solve with using TART_EXECUTOR_SHELL
(that zsh
does not do word-splitting on unquoted variables), can be worked around by adding something like this to the pipeline:
set -o shwordsplit || true
but it nevertheless seems that the TART_EXECUTOR_SHELL
's usefulness is severely lessened if many tools cannot be used when it is set.
I think this can be accomplished by simply starting a login shell (the one that reads .profile
and other files).
For example, if you need Bash, use TART_EXECUTOR_SHELL="bash -l"
.
I've created https://github.com/cirruslabs/gitlab-tart-executor/pull/46 to better document this.
indeed that seems to do the trick.
i didn't check the code, so I assumed that TART_EXECUTOR_SHELL
could have exactly three values (bash
, zsh
and none), rather than some arbitrary value.
thanks for the documentation update.
we are using
tart
for running gitlab-ci pipelines (great project btw, it's really the thing i've been looking for)now, a couple of our pipelines have code like this:
under
bash
(which used to be the default shell for all our cross-platform pipelines until now) this will run./somecmd --foo --bar
.however, the tart executor defaults to using
zsh
, which does not do word-splitting for non-quoted variables, and the command excuted is effectively./somecmd "--foo --bar"
, which of course is something completely different.now seeing that there is a
TART_EXECUTOR_SHELL
variable that i can set tobash
, i figured that this would solve my problems... only to discover, that the bash-environment significantly differs from the default environment.for me the difference is most prominently the lack of the
brew
, which stems from paths not being initialized.so here's a test-pipeline to examine the current behaviour
which gives me one successful job (where
TART_EXECUTOR_SHELL
is unset) and two failing ones (where it is set):TART_EXECUTOR_SHELL
$PATH
/Users/admin/flutter:/Users/admin/flutter/bin/:/Users/admin/flutter/bin/cache/dart-sdk/bin:/usr/local/bin/:/Users/admin/.rbenv/shims:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/Users/admin/android-sdk/cmdline-tools/latest/bin:/Users/admin/android-sdk/platform-tools:/Users/admin/android-sdk/emulator
bash
/usr/bin:/bin:/usr/sbin:/sbin
zsh
/usr/bin:/bin:/usr/sbin:/sbin
is this expected behaviour?