You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Fall back to current directory if we can't create the log directory
47
+
LOG_FILE="./package_tracking.log"
48
+
echo"Warning: Could not create log directory, using current directory">&2
49
+
fi
37
50
38
51
# Create data directory if it doesn't exist
39
-
mkdir -p "${DATA_DIR}"2>/dev/null ||true
52
+
if! mkdir -p "${DATA_DIR}"2>/dev/null;then
53
+
echo"Error: Could not create data directory: ${DATA_DIR}">&2
54
+
exit 1
55
+
fi
40
56
41
57
# Load configuration if exists
42
58
if [ -f"$CONFIG_FILE" ];then
@@ -175,6 +191,7 @@ get_current_versions() {
175
191
log "DEBUG""Found $total_packages packages to process"
176
192
177
193
>"${CURRENT_VERSIONS_FILE}.tmp"# Create or truncate the temporary file
194
+
chmod 600 "${CURRENT_VERSIONS_FILE}.tmp"2>/dev/null || log "WARNING""Could not set restrictive permissions on temporary file ${CURRENT_VERSIONS_FILE}.tmp"
0 commit comments