Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion kernel/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,16 @@ else
adduser --uid "${PUID}" --ingroup "${group_name}" --disabled-password --gecos "" "${user_name}"
fi

# Parse command line arguments for --workspace option
# Parse command line arguments for --workspace option or SIYUAN_WORKSPACE_PATH env variable
# Store other arguments in ARGS for later use
if [[ -v "${SIYUAN_WORKSPACE_PATH}" ]]; then
WORKSPACE_DIR="${SIYUAN_WORKSPACE_PATH}"
fi
ARGS=""
while [[ "$#" -gt 0 ]]; do
case $1 in
--workspace=*) WORKSPACE_DIR="${1#*=}"; shift ;;
--workspace) WORKSPACE_DIR="${2}"; shift; shift ;;
*) ARGS="$ARGS $1"; shift ;;
esac
done
Expand Down