Skip to content

Conversation

@rawkode
Copy link
Contributor

@rawkode rawkode commented Aug 8, 2025

Replace hardcoded #\!/bin/bash shebangs with #\!/usr/bin/env bash across all shell scripts to improve cross-platform compatibility.

This allows the scripts to work on systems where bash may be installed in different locations, such as BSD, macOS, NixOS, and GUIX.

Summary by CodeRabbit

  • Chores
    • Switched many shell scripts to a more portable Bash invocation (#!/usr/bin/env bash) for improved cross-environment compatibility.
  • Bug Fixes
    • Demo/setup flows now check for required CLI tooling and configure or install it into a user-local location if missing, avoiding unconditional system-wide installs.

Checklist

  • I have discussed my proposed changes in an issue and have received approval to proceed.
  • I have followed the coding standards of the project.
  • Tests or benchmarks have been added or updated.
  • Documentation has been updated on https://github.com/wundergraph/cosmo-docs.
  • I have read the Contributors Guide.

Replace hardcoded #\!/bin/bash shebangs with #\!/usr/bin/env bash
across all shell scripts to improve cross-platform compatibility.
This allows the scripts to work on systems where bash may be
installed in different locations.
@coderabbitai
Copy link

coderabbitai bot commented Aug 8, 2025

Walkthrough

Updated shebangs in many shell scripts from #!/bin/bash to #!/usr/bin/env bash. Two scripts (scripts/create-cli-demo.sh, scripts/setup-fulldemo.sh) also add conditional logic to ensure the wgc CLI is available (installing to a user-local npm prefix if missing). No other public interfaces changed.

Changes

Cohort / File(s) Change Summary
Infrastructure & tooling
.github/scripts/setup-keycloak.sh, keycloak/theme/build.sh, studio/entrypoint.sh
Shebang changed to #!/usr/bin/env bash. No other edits.
Data migrations
data_migrations/controlplane/1747776337_rbac_groups/migrate.sh
Shebang changed to #!/usr/bin/env bash. No other edits.
Demo & deploy
demo/bump-deps.sh, demo/compose.sh, demo/deploy.sh, demo/update_token.sh
Shebang changed to #!/usr/bin/env bash. No other edits.
Docker helpers
docker/nats/build-push.sh, docker/clickhouse/init-db.sh
Shebang changed to #!/usr/bin/env bash. No other edits.
Examples & demos
examples/full-cosmo-docker/*, examples/full-cosmo-helm/*, examples/router-simple/start.sh
Shebangs changed to #!/usr/bin/env bash. Some files also normalized trailing newlines.
Helm docs & values
helm/cosmo/README.md, helm/cosmo/values.yaml
Embedded ClickHouse init script shebang updated to #!/usr/bin/env bash in docs/values.
Router tests & schemas
router-tests/*, router/__schemas/*
Shebangs changed to #!/usr/bin/env bash. No other edits.
Scripts: bench, config, lifecycle
scripts/bench-*.sh, scripts/configurations/*.sh, scripts/create-*.sh, scripts/delete-*.sh, scripts/demo-router.sh, scripts/update-demo.sh, scripts/create-full-local-demo.sh, scripts/delete-full-local-demo.sh
Shebangs changed to #!/usr/bin/env bash. No other edits except cohorts noted below.
CLI availability adjustments
scripts/create-cli-demo.sh, scripts/setup-fulldemo.sh
Shebang updated; added conditional logic to ensure wgc is on PATH. If missing, set a user-local NPM_CONFIG_PREFIX, adjust PATH, create the prefix, and install wgc there.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title "fix: use universal shebangs for better portability" accurately describes the primary focus of the changeset. The vast majority of modifications across approximately 40+ files involve replacing hardcoded shebangs from #!/bin/bash to #!/usr/bin/env bash to improve cross-platform compatibility, which directly aligns with the title's intent. While two files (scripts/create-cli-demo.sh and scripts/setup-fulldemo.sh) contain additional logic changes related to wgc command handling, these represent a minor portion of the changeset and have already been flagged by a reviewer (miklosbarabas) as needing separation into a distinct pull request. The title is specific, clear, and captures the primary objective without being vague or misleading.
✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5dda393 and aae7d27.

📒 Files selected for processing (3)
  • .github/scripts/setup-keycloak.sh (1 hunks)
  • router-tests/update-config-no-edg.sh (1 hunks)
  • router-tests/update-config.sh (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • router-tests/update-config.sh
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
  • GitHub Check: build_test
  • GitHub Check: Analyze (go)
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: build_test
  • GitHub Check: build_test
  • GitHub Check: integration_test (./telemetry)
  • GitHub Check: integration_test (./. ./fuzzquery ./lifecycle ./modules)
  • GitHub Check: build_image_fork (nonroot)
  • GitHub Check: integration_test (./events)
  • GitHub Check: build_image_fork
  • GitHub Check: build_test_fork
🔇 Additional comments (2)
router-tests/update-config-no-edg.sh (1)

1-1: Shebang update improves portability.

The change to use #!/usr/bin/env bash is correct and aligns with the PR objective. This allows the script to work on systems where bash is installed in non-standard locations (BSD, macOS, NixOS, etc.).

.github/scripts/setup-keycloak.sh (1)

1-1: Shebang update improves portability.

The change to use #!/usr/bin/env bash is correct and consistent with the PR objective. This ensures the script works on systems with non-standard bash installations.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🔭 Outside diff range comments (1)
scripts/configurations/kubernetes.sh (1)

4-7: Avoid committing secrets; require env at runtime

COSMO_API_KEY appears hardcoded. Even if this is a dev value, don’t commit secrets. Source from environment and fail if missing.

- export COSMO_API_KEY=cosmo_669b576aaadc10ee1ae81d9193425705
+ # Require COSMO_API_KEY to be set in the environment before sourcing this file
+ : "${COSMO_API_KEY:?Set COSMO_API_KEY in your environment before sourcing scripts/configurations/kubernetes.sh}"
+ export COSMO_API_KEY

Optionally move all values into a non-committed .env file and source it locally.

🧹 Nitpick comments (23)
router/__schemas/plugin.sh (1)

1-3: Add strict mode for safer execution

Enable early failure and better error surfacing in CI.

 #!/usr/bin/env bash
+set -Eeuo pipefail
scripts/update-demo.sh (1)

1-3: Harden script options

Consider stricter flags to catch unset vars and pipeline errors.

- set -e
+ set -Eeuo pipefail
examples/full-cosmo-helm/create_demo.sh (1)

1-1: Avoid global npm install for wgc (optional)

Global installs often fail in CI or restricted environments. Prefer on-demand execution or a presence check.

Example (outside this hunk):

# Prefer npx (no global install) or fallback if missing
if ! command -v wgc >/dev/null 2>&1; then
  npx -y wgc@latest --version >/dev/null || npm install -g wgc@latest
fi
scripts/demo-router.sh (1)

1-7: Improve robustness and signal handling

Add strict mode and use exec so the script forwards signals to the Go process cleanly.

 #!/usr/bin/env bash
+set -Eeuo pipefail
 
 cd "../router"
 
-go run main.go -override-env=.env.demo
+exec go run main.go -override-env=.env.demo
studio/entrypoint.sh (1)

1-1: Portable shebang — approved; note one portability caveat

Shebang change is correct. Minor portability note: elsewhere in this script, sed -i (BSD vs GNU) differs; on macOS/BSD it typically needs an argument (e.g., -i ''), while GNU sed accepts bare -i. Consider using -i.bak and removing backups afterward to keep this script fully cross-platform.

examples/full-cosmo-docker/destroy.sh (1)

4-4: Make path change robust to invocation directory (optional)

Current relative cd can fail if the script is run from another CWD. Consider basing it on the script’s location.

Apply:

-cd ../.. && make full-demo-down
+SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
+cd "${SCRIPT_DIR}/../.." && make full-demo-down
scripts/delete-kubernetes-demo.sh (1)

6-6: Optional: source via script directory for robustness

Sourcing with a relative CWD can fail if invoked from another directory. Consider resolving relative to the script’s location.

-. ./scripts/configurations/kubernetes.sh
+SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
+. "${SCRIPT_DIR}/configurations/kubernetes.sh"
.github/scripts/setup-keycloak.sh (1)

1-5: Optional: harden the script (strict mode + curl failure on HTTP errors)

Add strict mode and make curl fail on non-2xx:

 #!/usr/bin/env bash
+set -Eeuo pipefail
+IFS=$'\n\t'
 
 export KC_VERSION=25.0.1
-curl -LO  https://github.com/keycloak/keycloak/releases/download/"${KC_VERSION}"/keycloak-"${KC_VERSION}".zip
+curl -fsSLO "https://github.com/keycloak/keycloak/releases/download/${KC_VERSION}/keycloak-${KC_VERSION}.zip"
demo/update_token.sh (1)

2-2: Optional: add pipefail

You already use -eu; pipefail helps catch failures in pipelines.

-set -eu
+set -euo pipefail
scripts/bench-delete.sh (1)

2-2: Optional: strict mode consistency

Consider enabling -u and pipefail to fail fast in CI.

-set -e
+set -euo pipefail
demo/bump-deps.sh (1)

1-5: Optional: add strict mode

This script manipulates git and go modules; better to fail early.

 #!/usr/bin/env bash
+set -Eeuo pipefail
+IFS=$'\n\t'
 
 GIT_REV=$(git show-ref main --heads -s)
router-tests/bump-deps.sh (1)

2-10: Consider failing fast on errors

Add strict mode so failures in git/go commands stop the script early.

 #!/usr/bin/env bash
+
+set -euo pipefail
+
 GIT_REV=$(git rev-parse --short HEAD)
 
 echo "Updating dependencies to $GIT_REV"
demo/compose.sh (1)

3-7: Harden script execution

  • Add strict mode.
  • Ensure cd failure exits (matches pattern used elsewhere in repo).
 #!/usr/bin/env bash
 
-cd "../cli"
+set -euo pipefail
+
+cd "../cli" || exit
 
 pnpm wgc router compose -i ../demo/graph.yaml -o ../demo/config.json
scripts/bench-update.sh (1)

2-12: Use pipefail and nounset as well

You already use set -e; add -u and pipefail for robustness when sourcing config and running pnpm.

- set -e
+set -euo pipefail
router-tests/update-config-no-edg.sh (1)

7-26: Add strict mode to fail fast

Ensures pnpm/jq errors stop the script instead of continuing.

 #!/usr/bin/env bash
+
+set -euo pipefail
examples/router-simple/start.sh (1)

2-2: Optional: harden failure modes

Consider enabling stricter bash flags for more predictable failures in pipelines and unset vars.

-set -e
+set -Eeuo pipefail
router/__schemas/compose.sh (1)

1-2: Shebang portability — LGTM; add strict mode (optional)

The env-based shebang is a portability win. Consider adding strict mode early in the script:

 #!/usr/bin/env bash
+
+set -Eeuo pipefail
router-tests/update-config.sh (1)

1-2: Portable shebang — LGTM; ensure robust error handling (optional)

Add strict mode so failures in compose/format steps abort the script:

 #!/usr/bin/env bash
+
+set -Eeuo pipefail
scripts/create-cloud-demo.sh (1)

1-2: Shebang portability — LGTM; tighten strict flags (optional)

Upgrade to stricter flags for safer execution:

 #!/usr/bin/env bash
-set -e
+set -Eeuo pipefail
scripts/delete-local-demo.sh (2)

1-2: Portable shebang — LGTM; strengthen error handling (optional)

Consider stricter flags:

 #!/usr/bin/env bash
-set -e
+set -Eeuo pipefail

6-7: Optional: source configuration robustly regardless of current working directory

Sourcing via a relative path can fail when invoked from another directory. Resolve via the script’s own directory:

-. ./scripts/configurations/local.sh
+script_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
+. "$script_dir/configurations/local.sh"
docker/clickhouse/init-db.sh (1)

1-1: Portability shebang looks good – consider stricter shell options.

#!/usr/bin/env bash solves the portability problem.
While touching the header, you might also add set -uo pipefail (alongside -e) to fail fast on unset vars and piped errors.

scripts/setup-fulldemo.sh (1)

25-29: wgc availability block works but duplicates logic – extract to a helper.

You now have (almost) identical “ensure-wgc-in-PATH” code here and in create-cli-demo.sh. Duplicating install logic across scripts risks drift.

Consider moving this snippet into a dedicated helper script or Make target and source/ invoke it from both places.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5e1e6e8 and 82dc3c7.

📒 Files selected for processing (43)
  • .github/scripts/setup-keycloak.sh (1 hunks)
  • data_migrations/controlplane/1747776337_rbac_groups/migrate.sh (1 hunks)
  • demo/bump-deps.sh (1 hunks)
  • demo/compose.sh (1 hunks)
  • demo/deploy.sh (1 hunks)
  • demo/update_token.sh (1 hunks)
  • docker/clickhouse/init-db.sh (1 hunks)
  • docker/nats/build-push.sh (1 hunks)
  • examples/full-cosmo-docker/destroy.sh (1 hunks)
  • examples/full-cosmo-docker/start.sh (1 hunks)
  • examples/full-cosmo-helm/create_demo.sh (1 hunks)
  • examples/full-cosmo-helm/delete_demo.sh (1 hunks)
  • examples/router-simple/start.sh (1 hunks)
  • helm/cosmo/README.md (1 hunks)
  • helm/cosmo/values.yaml (1 hunks)
  • keycloak/theme/build.sh (1 hunks)
  • router-tests/bump-deps.sh (1 hunks)
  • router-tests/testdata/tls/makecert.sh (1 hunks)
  • router-tests/update-config-no-edg.sh (1 hunks)
  • router-tests/update-config.sh (1 hunks)
  • router/__schemas/compose.sh (1 hunks)
  • router/__schemas/full-plugin-project.sh (1 hunks)
  • router/__schemas/plugin.sh (1 hunks)
  • scripts/bench-create.sh (1 hunks)
  • scripts/bench-delete.sh (1 hunks)
  • scripts/bench-router.sh (1 hunks)
  • scripts/bench-update.sh (1 hunks)
  • scripts/configurations/kubernetes.sh (1 hunks)
  • scripts/configurations/local.sh (1 hunks)
  • scripts/create-cli-demo.sh (1 hunks)
  • scripts/create-cloud-demo.sh (1 hunks)
  • scripts/create-docker-demo.sh (1 hunks)
  • scripts/create-full-local-demo.sh (1 hunks)
  • scripts/create-kubernetes-demo.sh (1 hunks)
  • scripts/create-local-demo.sh (1 hunks)
  • scripts/delete-docker-demo.sh (1 hunks)
  • scripts/delete-full-local-demo.sh (1 hunks)
  • scripts/delete-kubernetes-demo.sh (1 hunks)
  • scripts/delete-local-demo.sh (1 hunks)
  • scripts/demo-router.sh (1 hunks)
  • scripts/setup-fulldemo.sh (3 hunks)
  • scripts/update-demo.sh (1 hunks)
  • studio/entrypoint.sh (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: build_image_fork (nonroot)
  • GitHub Check: build_test_fork
  • GitHub Check: build_test
  • GitHub Check: build_image_fork
  • GitHub Check: Analyze (go)
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: build_test
🔇 Additional comments (35)
scripts/create-full-local-demo.sh (2)

1-1: Shebang portability change approved

Switching to #!/usr/bin/env bash improves portability across macOS/BSD/Nix/Guix and similar environments.


1-3: Repo-wide script verification complete: no issues detected

  • All scripts use #!/usr/bin/env bash (no hardcoded /bin/bash)
  • All .sh files are executable
  • No CRLF line endings in shell scripts (the only CRLF result was in a Windows batch file: client-tests/apollo-kotlin/gradlew.bat, which is expected)
router/__schemas/plugin.sh (1)

1-1: Shebang portability change approved

Standardizing on #!/usr/bin/env bash is the right call here.

scripts/update-demo.sh (1)

1-1: Shebang portability change approved

Good move to prefer env-based resolution.

examples/full-cosmo-helm/create_demo.sh (1)

1-1: Shebang portability change approved

Consistent with the PR goal; no behavior change.

scripts/demo-router.sh (1)

1-1: Shebang portability change approved

Looks good.

scripts/create-local-demo.sh (1)

1-1: Env-based shebang applied consistently across the repo; no /bin/bash shebangs found

Cross-repo sanity check confirms there are no remaining hardcoded #!/bin/bash lines.

router-tests/testdata/tls/makecert.sh (1)

1-1: Shebang updated to /usr/bin/env bash — looks good

Improves interpreter resolution without altering behavior.

keycloak/theme/build.sh (1)

1-1: Env-based shebang is correct here — approved

Consistent with the rest of the repo and keeps set -euo pipefail semantics intact.

router/__schemas/full-plugin-project.sh (1)

1-1: Good switch to /usr/bin/env bash

Enhances portability for environments where bash isn’t in /bin.

scripts/create-kubernetes-demo.sh (1)

1-1: Portable shebang verification successful

A repository-wide scan found no hardcoded bash shebangs (/bin/bash, /usr/bin/bash, /usr/local/bin/bash); all scripts now use #!/usr/bin/env bash. LGTM.

examples/full-cosmo-docker/destroy.sh (1)

1-1: Portable shebang — LGTM

Correct, consistent with the PR goal. No behavior change.

scripts/delete-full-local-demo.sh (1)

1-1: Portable shebang — LGTM

Good portability improvement; no logic changes.

data_migrations/controlplane/1747776337_rbac_groups/migrate.sh (1)

1-1: Portable shebang — LGTM

Appropriate for environments where bash isn’t at a fixed path. Script already uses bash-specific features, so this aligns well.

examples/full-cosmo-helm/delete_demo.sh (1)

1-1: Portable shebang — LGTM

Matches the repository-wide standardization. No functional changes.

scripts/create-docker-demo.sh (1)

1-1: Repo-wide shell script checks passed — no action needed

All scripts were scanned for legacy shebangs, executable bits, and CRLF endings:

  • ✓ No #!/bin/bash shebangs found
  • ✓ All tracked .sh files are executable
  • ✓ No CRLF line endings detected

Excellent portability improvement—LGTM!

scripts/bench-create.sh (1)

1-1: Portability shebang change — LGTM.
Consistent with the PR’s goal; no behavior change.

docker/nats/build-push.sh (1)

1-1: Env-based shebang for Bash — LGTM.
Appropriate for cross-platform environments; no functional changes.

scripts/delete-docker-demo.sh (1)

1-1: Portable shebang — LGTM.
Matches the repo-wide migration; script behavior unchanged.

scripts/bench-router.sh (1)

1-1: Use of /usr/bin/env bash — LGTM.
Aligns with portability objective; no other modifications observed.

.github/scripts/setup-keycloak.sh (1)

1-1: Shebang portability LGTM

Using /usr/bin/env bash is the right call for CI runners and diverse images.

demo/update_token.sh (1)

1-1: Shebang portability LGTM

Matches the PR objective, no behavioral changes.

scripts/bench-delete.sh (1)

1-1: Shebang portability LGTM

Consistent with other scripts, no logic change.

demo/bump-deps.sh (1)

1-1: Shebang portability LGTM

Right move for developer machines and CI.

router-tests/bump-deps.sh (1)

1-1: Shebang portability LGTM

Switching to /usr/bin/env bash improves cross-platform compatibility. Good change.

demo/compose.sh (1)

1-1: Shebang portability LGTM

Standard, portable shebang. Approved.

scripts/bench-update.sh (1)

1-1: Shebang portability LGTM

Consistent with the repo-wide update. Looks good.

router-tests/update-config-no-edg.sh (1)

1-1: Shebang portability LGTM

Good standardization to /usr/bin/env bash.

scripts/configurations/kubernetes.sh (1)

1-1: Shebang portability LGTM

Matches the stated PR goal. Approved.

examples/router-simple/start.sh (1)

1-1: No remaining /bin/bash shebangs; optional script hardening

I ran the suggested repository-wide search and confirmed there are no hardcoded /bin/bash shebangs left—everything now uses #!/usr/bin/env bash.

  • examples/router-simple/start.sh begins with #!/usr/bin/env bash
  • Repository check:
    rg -n --hidden -g '!node_modules' -g '!dist' -g '!build' -e '^#!\s*/bin/bash\b'
    # → no matches

Optional: consider adding set -o pipefail and set -u at the top of your scripts for stronger error detection.

scripts/configurations/local.sh (1)

1-1: LGTM: switched to env-based bash for portability

Using /usr/bin/env makes this script more robust across environments. No functional changes introduced.

demo/deploy.sh (1)

1-1: LGTM: env-based shebang improves cross-platform support

Interpreter discovery via env is preferred on macOS/BSD/NixOS/GUIX. No behavior change.

examples/full-cosmo-docker/start.sh (1)

1-1: LGTM: portable shebang; EOF newline addition is fine

  • Shebang update is correct and portable.
  • Newline at EOF (Line 4) is a good hygiene fix; no logic changes.

Also applies to: 4-4

helm/cosmo/README.md (1)

47-47: Sync README template and regenerate Helm docs

The values table now reflects the portable shebang in db-init.sh. Note that helm/cosmo/README.md is generated by helm-docs from helm/cosmo/README.md.gotmpl (see helm/Makefile:34). Please update the template (and values.yaml if needed) and regenerate the docs:

cd helm/cosmo
helm-docs . -o README.md
# or from repo root:
make -C helm docs
helm/cosmo/values.yaml (1)

425-425: Confirm /usr/bin/env availability or switch to a fixed bash shebang

The Bitnami ClickHouse image uses /bin/bash to run your initdbScripts, and /usr/bin/env may not be present in every variant. To avoid surprises at runtime:

  • Verify that your target image includes env (for example:
    docker run --rm bitnami/clickhouse:latest which env
    If this returns nothing, /usr/bin/env isn’t available.)
  • If env isn’t present, update your script’s shebang to #!/bin/bash.
  • Ensure the script is executable (e.g. chmod +x initdb.sh) before mounting it.

Locations to check:
• helm/cosmo/values.yaml: line 425 (your initdb-script entry)

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Shebang portability LGTM

Switching to env-based bash improves cross-distro portability (macOS, BSD, Nix, Guix, containers). No functional impact here.

To ensure no hardcoded /bin/bash shebangs remain, run:


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail
rg -n '^\#\!\s*/bin/bash(\s|$)' || echo "No /bin/bash shebangs left"

Length of output: 209


Shebang portability LGTM – update verification regex

File: scripts/delete-kubernetes-demo.sh
Lines: 1-1

#!/usr/bin/env bash

Shebang portability LGTM
Switching to an env-based bash shebang improves cross-distro portability (macOS, BSD, Nix, Guix, containers). No functional impact here.

To ensure there are no remaining hardcoded /bin/bash shebangs, update the verification command to use a Rust-compatible regex:

#!/usr/bin/env bash
set -euo pipefail
rg -n '^#!\s*/bin/bash(\s|$)' || echo "No /bin/bash shebangs left"
🤖 Prompt for AI Agents
In scripts/delete-kubernetes-demo.sh at line 1, the shebang is correctly updated
to use /usr/bin/env bash for portability. To complete this improvement, add the
suggested verification command using ripgrep with the Rust-compatible regex to
check for any remaining hardcoded /bin/bash shebangs. This involves appending
the lines setting strict bash options and the rg command as shown, ensuring the
script can verify no hardcoded shebangs remain.

@github-actions
Copy link

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Aug 23, 2025
@Copilot Copilot AI review requested due to automatic review settings August 28, 2025 08:39
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@github-actions github-actions bot removed the Stale label Aug 29, 2025
@github-actions
Copy link

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added Stale and removed Stale labels Sep 27, 2025
export NPM_CONFIG_PREFIX="${NPM_CONFIG_PREFIX:-$HOME/.npm-global}"
export PATH="$NPM_CONFIG_PREFIX/bin:$PATH"
fi

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think its better to move changes to wgc to a separate commit.
Also rebase instead of pulling merge commits.

(Just my suggestions, I just came across this pr and not a contributor to this repo)

@github-actions
Copy link

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Oct 22, 2025
@miklosbarabas
Copy link
Contributor

hi @rawkode, thanks for you contribution.
could you please move the wgc related changes to a separate PR and leave this one for the shebang changes only?

@github-actions github-actions bot removed the Stale label Oct 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants