mirror of
https://github.com/KeygraphHQ/shannon.git
synced 2026-05-18 23:18:08 +02:00
fix: resolve named workspace workflow ID in logs command
Strip _shannon-* suffix from workflow IDs so logs command finds audit-logs stored under the workspace name.
This commit is contained in:
@@ -258,7 +258,17 @@ cmd_logs() {
|
||||
WORKSPACE_ID="${ID%%_resume_*}"
|
||||
if [ "$WORKSPACE_ID" != "$ID" ] && [ -f "./audit-logs/${WORKSPACE_ID}/workflow.log" ]; then
|
||||
WORKFLOW_LOG="./audit-logs/${WORKSPACE_ID}/workflow.log"
|
||||
else
|
||||
fi
|
||||
|
||||
# For named workspace IDs (e.g. workspace_shannon-123), check the workspace name
|
||||
if [ -z "$WORKFLOW_LOG" ]; then
|
||||
WORKSPACE_ID="${ID%%_shannon-*}"
|
||||
if [ "$WORKSPACE_ID" != "$ID" ] && [ -f "./audit-logs/${WORKSPACE_ID}/workflow.log" ]; then
|
||||
WORKFLOW_LOG="./audit-logs/${WORKSPACE_ID}/workflow.log"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$WORKFLOW_LOG" ]; then
|
||||
# Search for the workflow directory (handles custom OUTPUT paths)
|
||||
FOUND=$(find . -maxdepth 3 -path "*/${ID}/workflow.log" -type f 2>/dev/null | head -1)
|
||||
if [ -n "$FOUND" ]; then
|
||||
|
||||
Reference in New Issue
Block a user