Expand LinuxCNC interpreter regression coverage
This commit is contained in:
@@ -24,6 +24,22 @@ if [[ ! -f "$MANIFEST_FILE" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
validate_manifest_path() {
|
||||
local src_rel="$1"
|
||||
if [[ "$src_rel" = /* || "$src_rel" == */ || "$src_rel" == *"//"* ]]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
local component
|
||||
local -a path_components
|
||||
IFS=/ read -r -a path_components <<< "$src_rel"
|
||||
for component in "${path_components[@]}"; do
|
||||
if [[ -z "$component" || "$component" == "." || "$component" == ".." ]]; then
|
||||
return 1
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
mkdir -p "$BUILD_DIR"
|
||||
|
||||
vendor_sync_fingerprint() {
|
||||
@@ -65,7 +81,7 @@ while IFS= read -r src_rel; do
|
||||
[[ -z "$src_rel" ]] && continue
|
||||
[[ "${src_rel:0:1}" == "#" ]] && continue
|
||||
|
||||
if [[ "$src_rel" = /* || "$src_rel" == *".."* ]]; then
|
||||
if ! validate_manifest_path "$src_rel"; then
|
||||
echo "invalid manifest path: $src_rel" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user