-
Notifications
You must be signed in to change notification settings - Fork 359
Disable shell history expansion for bash scripts and MCP CLI wrappers #27851
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| #!/bin/bash | ||
| set +o histexpand | ||
|
|
||
|
|
||
| # install project dependencies | ||
| make deps | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| #!/bin/bash | ||
| set +o histexpand | ||
|
|
||
| # Test script for install.sh in setup-cli action | ||
| set -e | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -289,6 +289,8 @@ function generateCLIWrapperScript(serverName, serverUrl, toolsFile, apiKey, brid | |
| const safeBridge = shellEscapeDoubleQuoted(bridgeScript); | ||
|
|
||
| return `#!/usr/bin/env bash | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ✅ Excellent — adding |
||
| set +o histexpand | ||
|
|
||
| # MCP CLI wrapper for: ${safeName} | ||
| # Auto-generated by gh-aw. Do not modify. | ||
| # | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| #!/usr/bin/env bash | ||
| set +o histexpand | ||
|
|
||
| # Setup Action | ||
| # Copies activation job files to the agent environment | ||
| # | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| #!/bin/bash | ||
| set +o histexpand | ||
|
|
||
| # Test script for check_mcp_servers.sh | ||
| set -e | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| #!/usr/bin/env bash | ||
| set +o histexpand | ||
|
|
||
| # Test script for configure_gh_for_ghe.sh | ||
|
|
||
| set -e | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| #!/usr/bin/env bash | ||
| set +o histexpand | ||
|
|
||
| # Test script for convert_gateway_config_codex.sh | ||
|
|
||
| set -e | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| #!/usr/bin/env bash | ||
| set +o histexpand | ||
|
|
||
|
Comment on lines
1
to
+3
|
||
| # Sanitize PATH by removing empty elements, leading/trailing colons | ||
| # Usage: source sanitize_path.sh <raw_path> | ||
| # or: . sanitize_path.sh <raw_path> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| #!/usr/bin/env bash | ||
| set +o histexpand | ||
|
|
||
| # Tests for sanitize_path.sh | ||
| # Run: bash sanitize_path_test.sh | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| #!/bin/bash | ||
| set +o histexpand | ||
|
|
||
| # Test script for start_mcp_gateway.sh | ||
| set -e | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| #!/bin/bash | ||
| set +o histexpand | ||
|
|
||
| # Test script for validate_gatewayed_server.sh | ||
| set -e | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| #!/bin/bash | ||
| set +o histexpand | ||
|
|
||
| # Test script for validate_prompt_placeholders.sh | ||
|
|
||
| set -e | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Good practice adding
set +o histexpandright after the shebang line. This disables Bash history expansion globally for the script, preventing unexpected!expansion issues. Consider adding a brief inline comment explaining why this is needed for maintainability.