This PR removes the 'x-hack' from the scripts in the lib/functions/cli and lib/functions/rootfs directories. The 'x-hack' is a workaround used in bash scripts to avoid issues with unset variables. However, it's not a good practice and can lead to confusion and unexpected behavior. The modern equivalent is to use parameter expansion or to check if a variable is set before using it.
Summary of Changes
Replaced all instances of 'x-hack' in the scripts with the modern equivalent using parameter expansion or by checking if a variable is set before using it.
The affected scripts are:
lib/functions/cli/entrypoint.sh
lib/functions/cli/commands.sh
lib/functions/cli/cli-patch.sh
lib/functions/cli/cli-distccd.sh
lib/functions/cli/cli-configdump.sh
lib/functions/rootfs/distro-specific.sh
lib/functions/rootfs/distro-agnostic.sh
lib/functions/rootfs/create-cache.sh
Tested the scripts to ensure they are still working as expected after the changes.
Fixes #93.
π Latest improvements to Sweep:
Getting Sweep to run linters before committing! Check out Sweep Sandbox Configs to set it up.
Added support for self-hosting! Check out Self-hosting Sweep to get started.
[Self Hosting] Multiple options to compute vector embeddings, configure your .env file using VECTOR_EMBEDDING_SOURCE
π‘ To get Sweep to edit this pull request, you can:
Leave a comment below to get Sweep to edit the entire PR
Leave a comment in the code will only modify the file
Edit the original issue to get Sweep to recreate the PR from scratch
PR Feedback (click)
Description
This PR removes the 'x-hack' from the scripts in the lib/functions/cli and lib/functions/rootfs directories. The 'x-hack' is a workaround used in bash scripts to avoid issues with unset variables. However, it's not a good practice and can lead to confusion and unexpected behavior. The modern equivalent is to use parameter expansion or to check if a variable is set before using it.
Summary of Changes
Fixes #93.
π Latest improvements to Sweep:
π‘ To get Sweep to edit this pull request, you can: