about summary refs log tree commit diff
path: root/src/ci/exec-with-shell.py
diff options
context:
space:
mode:
authorPietro Albini <pietro@pietroalbini.org>2019-11-26 12:06:30 +0100
committerPietro Albini <pietro@pietroalbini.org>2020-03-24 15:36:07 +0100
commit9beb8f54774ca0d41dd2eb7622809f4073676757 (patch)
tree17c73a58c8c2199aa866437deb982cf1cf9b8111 /src/ci/exec-with-shell.py
parent9d5c416037b2066b0b1450952914989dee73900a (diff)
downloadrust-9beb8f54774ca0d41dd2eb7622809f4073676757.tar.gz
rust-9beb8f54774ca0d41dd2eb7622809f4073676757.zip
ci: add github actions configuration
Diffstat (limited to 'src/ci/exec-with-shell.py')
-rwxr-xr-xsrc/ci/exec-with-shell.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/ci/exec-with-shell.py b/src/ci/exec-with-shell.py
new file mode 100755
index 00000000000..26ce69e33d9
--- /dev/null
+++ b/src/ci/exec-with-shell.py
@@ -0,0 +1,16 @@
+#!/usr/bin/env python
+# A simple wrapper that forwards the arguments to bash, unless the
+# CI_OVERRIDE_SHELL environment variable is present: in that case the content
+# of that environment variable is used as the shell path.
+
+import os
+import sys
+import subprocess
+
+try:
+    shell = os.environ["CI_OVERRIDE_SHELL"]
+except KeyError:
+    shell = "bash"
+
+res = subprocess.call([shell] + sys.argv[1:])
+sys.exit(res)