okstra 0.97.0 → 0.97.1
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
CHANGED
package/runtime/BUILD.json
CHANGED
|
@@ -12,8 +12,16 @@ is_interactive_session() {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
file_mtime() {
|
|
15
|
-
# Epoch mtime; portable across
|
|
16
|
-
|
|
15
|
+
# Epoch mtime; portable across GNU (stat -c) and macOS/BSD (stat -f).
|
|
16
|
+
# Validate that the output is a bare integer before accepting it: GNU
|
|
17
|
+
# `stat -f %m` (a BSD-ism) does NOT fail cleanly — it succeeds with
|
|
18
|
+
# non-numeric filesystem output, so a plain `a || b` would return that
|
|
19
|
+
# garbage and later break `-gt`/`-eq` arithmetic under `set -u`.
|
|
20
|
+
local m=""
|
|
21
|
+
m="$(stat -c %Y "$1" 2>/dev/null)"
|
|
22
|
+
[[ "$m" =~ ^[0-9]+$ ]] || m="$(stat -f %m "$1" 2>/dev/null)"
|
|
23
|
+
[[ "$m" =~ ^[0-9]+$ ]] || m="0"
|
|
24
|
+
printf '%s' "$m"
|
|
17
25
|
}
|
|
18
26
|
|
|
19
27
|
split_task_key() {
|