From 2d2fa652a501f3bd6f09421e3bf3afabec6c4167 Mon Sep 17 00:00:00 2001 From: Vatsal Gupta <40350810+gvatsal60@users.noreply.github.com> Date: Tue, 4 Aug 2026 19:30:25 +0530 Subject: [PATCH 1/3] chore: add set -o pipefail to postCreateScript.sh --- .devcontainer/postCreateScript.sh | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.devcontainer/postCreateScript.sh b/.devcontainer/postCreateScript.sh index 79ed771..49d1871 100755 --- a/.devcontainer/postCreateScript.sh +++ b/.devcontainer/postCreateScript.sh @@ -1,4 +1,5 @@ #!/bin/sh +set -o pipefail ################################################################################################### # File: postCreateScript.sh @@ -36,6 +37,14 @@ readonly ALIAS_SRC_URL="https://raw.githubusercontent.com/gvatsal60/Linux-Aliase ################################################################################################### # Functions ################################################################################################### +curl_https() { + if ! command -v curl >/dev/null 2>&1; then + echo "Error: curl is not installed. Aborting." >&2 + return 1 + fi + curl -fsSL --proto '=https' "$@" +} + ################################################################################################### # Main Script @@ -43,12 +52,7 @@ readonly ALIAS_SRC_URL="https://raw.githubusercontent.com/gvatsal60/Linux-Aliase # Install Linux aliases from external script using curl and execute immediately # Note: Make sure to review scripts fetched from external sources for security reasons -if command -v curl >/dev/null 2>&1; then - curl -fsSL "${ALIAS_SRC_URL}" | sh -else - echo "Error: curl is not installed. Unable to use Linux aliases" - exit 1 -fi +curl_https "${ALIAS_SRC_URL}" | sh # As bind mounts not supported in GitHub Codespaces if [ -n "${CODESPACE_NAME}" ]; then @@ -67,4 +71,4 @@ if [ -n "${CODESPACE_NAME}" ]; then ln -s "$(realpath "${file}")" "${VSCODE_DIR}/$(basename "${file}")" done fi -fi +fi \ No newline at end of file From e16bed0e1460f5814ea1930d026b5b730025cd0f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 4 Aug 2026 14:01:39 +0000 Subject: [PATCH 2/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .devcontainer/postCreateScript.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/postCreateScript.sh b/.devcontainer/postCreateScript.sh index 49d1871..9d3c976 100755 --- a/.devcontainer/postCreateScript.sh +++ b/.devcontainer/postCreateScript.sh @@ -71,4 +71,4 @@ if [ -n "${CODESPACE_NAME}" ]; then ln -s "$(realpath "${file}")" "${VSCODE_DIR}/$(basename "${file}")" done fi -fi \ No newline at end of file +fi From cd10eb8bf010f6abef38db01a996cf6ed58cc174 Mon Sep 17 00:00:00 2001 From: Vatsal Gupta <40350810+gvatsal60@users.noreply.github.com> Date: Tue, 4 Aug 2026 19:44:36 +0530 Subject: [PATCH 3/3] Remove pipefail from postCreateScript.sh --- .devcontainer/postCreateScript.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/.devcontainer/postCreateScript.sh b/.devcontainer/postCreateScript.sh index 9d3c976..e9ad0ce 100755 --- a/.devcontainer/postCreateScript.sh +++ b/.devcontainer/postCreateScript.sh @@ -1,5 +1,4 @@ #!/bin/sh -set -o pipefail ################################################################################################### # File: postCreateScript.sh