Spaces:
Sleeping
Sleeping
Vatsal Gupta pre-commit-ci[bot] commited on
chore: add set -o pipefail to postCreateScript.sh (#258)
Browse files* chore: add set -o pipefail to postCreateScript.sh
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Remove pipefail from postCreateScript.sh
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
.devcontainer/postCreateScript.sh
CHANGED
|
@@ -39,6 +39,13 @@ readonly UV_INSTALL_URL="https://astral.sh/uv/install.sh"
|
|
| 39 |
##########################################################################################
|
| 40 |
# Functions
|
| 41 |
##########################################################################################
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
|
| 43 |
##########################################################################################
|
| 44 |
# Main Script
|
|
@@ -46,13 +53,8 @@ readonly UV_INSTALL_URL="https://astral.sh/uv/install.sh"
|
|
| 46 |
|
| 47 |
# Install Linux aliases from external script using curl and execute immediately
|
| 48 |
# Note: Make sure to review scripts fetched from external sources for security reasons
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
curl -fsSL "${UV_INSTALL_URL}" | sh
|
| 52 |
-
else
|
| 53 |
-
echo "Error: curl is not installed. Unable to use Linux aliases"
|
| 54 |
-
exit 1
|
| 55 |
-
fi
|
| 56 |
|
| 57 |
# As bind mounts not supported in GitHub Codespaces
|
| 58 |
if [ -n "${CODESPACE_NAME}" ]; then
|
|
|
|
| 39 |
##########################################################################################
|
| 40 |
# Functions
|
| 41 |
##########################################################################################
|
| 42 |
+
curl_https() {
|
| 43 |
+
if ! command -v curl >/dev/null 2>&1; then
|
| 44 |
+
echo "Error: curl is not installed. Aborting." >&2
|
| 45 |
+
return 1
|
| 46 |
+
fi
|
| 47 |
+
curl -fsSL --proto '=https' "$@"
|
| 48 |
+
}
|
| 49 |
|
| 50 |
##########################################################################################
|
| 51 |
# Main Script
|
|
|
|
| 53 |
|
| 54 |
# Install Linux aliases from external script using curl and execute immediately
|
| 55 |
# Note: Make sure to review scripts fetched from external sources for security reasons
|
| 56 |
+
curl_https "${ALIAS_SRC_URL}" | sh
|
| 57 |
+
curl_https "${UV_INSTALL_URL}" | sh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
|
| 59 |
# As bind mounts not supported in GitHub Codespaces
|
| 60 |
if [ -n "${CODESPACE_NAME}" ]; then
|