mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-01-30 06:12:03 +00:00
feat: enhance project name sanitization and improve Docker image naming
- Added a `sanitizeProjectName` function to ensure project names are safe for shell commands and Docker image names by converting them to lowercase and removing non-alphanumeric characters. - Updated `dev.mjs` and `start.mjs` to utilize the new sanitization function when determining Docker image names, enhancing security and consistency. - Refactored the Docker entrypoint script to ensure proper permissions for the Cursor CLI config directory, improving setup reliability. - Clarified documentation regarding the storage location of OAuth tokens for the Cursor CLI on Linux. These changes improve the robustness of the Docker setup and enhance the overall development workflow.
This commit is contained in:
@@ -17,19 +17,13 @@ fi
|
||||
chown -R automaker:automaker /home/automaker/.claude
|
||||
chmod 700 /home/automaker/.claude
|
||||
|
||||
# Fix permissions on Cursor CLI config directory if it exists
|
||||
# This handles the case where a volume is mounted and owned by root
|
||||
if [ -d "/home/automaker/.cursor" ]; then
|
||||
chown -R automaker:automaker /home/automaker/.cursor
|
||||
chmod -R 700 /home/automaker/.cursor
|
||||
fi
|
||||
|
||||
# Ensure the directory exists with correct permissions if volume is empty
|
||||
# Ensure Cursor CLI config directory exists with correct permissions
|
||||
# This handles both: mounted volumes (owned by root) and empty directories
|
||||
if [ ! -d "/home/automaker/.cursor" ]; then
|
||||
mkdir -p /home/automaker/.cursor
|
||||
chown automaker:automaker /home/automaker/.cursor
|
||||
chmod 700 /home/automaker/.cursor
|
||||
fi
|
||||
chown -R automaker:automaker /home/automaker/.cursor
|
||||
chmod -R 700 /home/automaker/.cursor
|
||||
|
||||
# If CURSOR_AUTH_TOKEN is set, write it to the cursor auth file
|
||||
# On Linux, cursor-agent uses ~/.config/cursor/auth.json for file-based credential storage
|
||||
|
||||
Reference in New Issue
Block a user