@rulemetric/hooks 0.7.29 → 0.7.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/scripts/_config.sh +9 -0
- package/scripts/_log.sh +9 -0
- package/scripts/_normalize.sh +9 -0
package/package.json
CHANGED
package/scripts/_config.sh
CHANGED
|
@@ -13,6 +13,15 @@
|
|
|
13
13
|
# discoverable on hosts that do not have jq installed system-wide.
|
|
14
14
|
if ! command -v jq >/dev/null 2>&1; then
|
|
15
15
|
_rulemetric_scripts_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
16
|
+
# npm normalises tarball file modes to 0644, so the bundled shim arrives
|
|
17
|
+
# NON-EXECUTABLE from a published install — `command -v jq` then never finds
|
|
18
|
+
# it on PATH and the fallback silently does not exist at all. Measured on
|
|
19
|
+
# @rulemetric/hooks@0.7.29: scripts/jq shipped -rw-r--r--. Restore the bit
|
|
20
|
+
# here; best effort, because a read-only install must stay on the safe
|
|
21
|
+
# clean-skip path rather than fail the hook.
|
|
22
|
+
if [ -f "$_rulemetric_scripts_dir/jq" ] && [ ! -x "$_rulemetric_scripts_dir/jq" ]; then
|
|
23
|
+
chmod +x "$_rulemetric_scripts_dir/jq" 2>/dev/null || true
|
|
24
|
+
fi
|
|
16
25
|
if [ -x "$_rulemetric_scripts_dir/jq" ]; then
|
|
17
26
|
PATH="$_rulemetric_scripts_dir:$PATH"
|
|
18
27
|
export PATH
|
package/scripts/_log.sh
CHANGED
|
@@ -5,6 +5,15 @@
|
|
|
5
5
|
|
|
6
6
|
if ! command -v jq >/dev/null 2>&1; then
|
|
7
7
|
_rulemetric_log_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
8
|
+
# npm normalises tarball file modes to 0644, so the bundled shim arrives
|
|
9
|
+
# NON-EXECUTABLE from a published install — `command -v jq` then never finds
|
|
10
|
+
# it on PATH and the fallback silently does not exist at all. Measured on
|
|
11
|
+
# @rulemetric/hooks@0.7.29: scripts/jq shipped -rw-r--r--. Restore the bit
|
|
12
|
+
# here; best effort, because a read-only install must stay on the safe
|
|
13
|
+
# clean-skip path rather than fail the hook.
|
|
14
|
+
if [ -f "$_rulemetric_log_dir/jq" ] && [ ! -x "$_rulemetric_log_dir/jq" ]; then
|
|
15
|
+
chmod +x "$_rulemetric_log_dir/jq" 2>/dev/null || true
|
|
16
|
+
fi
|
|
8
17
|
if [ -x "$_rulemetric_log_dir/jq" ]; then
|
|
9
18
|
PATH="$_rulemetric_log_dir:$PATH"
|
|
10
19
|
export PATH
|
package/scripts/_normalize.sh
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
if ! command -v jq >/dev/null 2>&1; then
|
|
4
4
|
_rulemetric_normalize_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
5
|
+
# npm normalises tarball file modes to 0644, so the bundled shim arrives
|
|
6
|
+
# NON-EXECUTABLE from a published install — `command -v jq` then never finds
|
|
7
|
+
# it on PATH and the fallback silently does not exist at all. Measured on
|
|
8
|
+
# @rulemetric/hooks@0.7.29: scripts/jq shipped -rw-r--r--. Restore the bit
|
|
9
|
+
# here; best effort, because a read-only install must stay on the safe
|
|
10
|
+
# clean-skip path rather than fail the hook.
|
|
11
|
+
if [ -f "$_rulemetric_normalize_dir/jq" ] && [ ! -x "$_rulemetric_normalize_dir/jq" ]; then
|
|
12
|
+
chmod +x "$_rulemetric_normalize_dir/jq" 2>/dev/null || true
|
|
13
|
+
fi
|
|
5
14
|
if [ -x "$_rulemetric_normalize_dir/jq" ]; then
|
|
6
15
|
PATH="$_rulemetric_normalize_dir:$PATH"
|
|
7
16
|
export PATH
|