fix: ensure deliverables directory is writable by container user (#116)
Pre-create the deliverables directory with proper permissions on the host before starting containers, and surface permission errors instead of silently swallowing them in save_deliverable.
This commit is contained in:
@@ -29,7 +29,7 @@ export function saveDeliverableFile(targetDir: string, filename: string, content
|
|||||||
try {
|
try {
|
||||||
mkdirSync(deliverablesDir, { recursive: true });
|
mkdirSync(deliverablesDir, { recursive: true });
|
||||||
} catch {
|
} catch {
|
||||||
// Directory might already exist, ignore
|
throw new Error(`Cannot create deliverables directory at ${deliverablesDir}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write file (atomic write - single operation)
|
// Write file (atomic write - single operation)
|
||||||
|
|||||||
@@ -194,6 +194,12 @@ cmd_start() {
|
|||||||
mkdir -p ./audit-logs
|
mkdir -p ./audit-logs
|
||||||
chmod 777 ./audit-logs
|
chmod 777 ./audit-logs
|
||||||
|
|
||||||
|
# Ensure repo deliverables directory is writable by container user (UID 1001)
|
||||||
|
if [ -d "./repos/$REPO" ]; then
|
||||||
|
mkdir -p "./repos/$REPO/deliverables"
|
||||||
|
chmod 777 "./repos/$REPO/deliverables"
|
||||||
|
fi
|
||||||
|
|
||||||
# Ensure containers are running (starts them if needed)
|
# Ensure containers are running (starts them if needed)
|
||||||
ensure_containers
|
ensure_containers
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user