Skip to content

add an --override flag such the base utility.yaml can be extended#2

Open
bikehara-ias wants to merge 1 commit intosamrocketman:mainfrom
bikehara-ias:allow-version-overrides
Open

add an --override flag such the base utility.yaml can be extended#2
bikehara-ias wants to merge 1 commit intosamrocketman:mainfrom
bikehara-ias:allow-version-overrides

Conversation

@bikehara-ias
Copy link

No description provided.


# Handle YAML merging if requested
if [ -n "${override_yaml_file:-}" ]; then
merged_yaml_file="$(mktemp)"
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
merged_yaml_file="$(mktemp)"
merged_yaml_file="${TMP_DIR}/merged.yaml"

TMP_DIR is created for temporary files and is automatically deleted when script exits.

# Check if next argument exists and doesn't start with --
if [ $# -gt 1 ] && [[ ! "$2" =~ ^-- ]]; then
debug_yaml_file="$2"
shift
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
shift
shift
else
echo "ERROR: A file name is required after --debug-yaml" >&2
exit 1

This helps prevent continuing if the user intended an option but provided an invalid one.

@samrocketman
Copy link
Owner

I am going on vacay and will take a deeper look (this was done from mobile).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants