summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/build-support/setup-hooks/set-source-date-epoch-to-latest.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/build-support/setup-hooks/set-source-date-epoch-to-latest.sh b/pkgs/build-support/setup-hooks/set-source-date-epoch-to-latest.sh
index 84e40cd0514..ae34ffec485 100644
--- a/pkgs/build-support/setup-hooks/set-source-date-epoch-to-latest.sh
+++ b/pkgs/build-support/setup-hooks/set-source-date-epoch-to-latest.sh
@@ -10,7 +10,7 @@ updateSourceDateEpoch() {
     local newestFile="${res[1]}"
 
     # Update $SOURCE_DATE_EPOCH if the most recent file we found is newer.
-    if [ "$time" -gt "$SOURCE_DATE_EPOCH" ]; then
+    if [ "${time:-0}" -gt "$SOURCE_DATE_EPOCH" ]; then
         echo "setting SOURCE_DATE_EPOCH to timestamp $time of file $newestFile"
         export SOURCE_DATE_EPOCH="$time"