Skip to content

Commit 9d0bca3

Browse files
Copilotmagerstam
andauthored
chore(scripts): clarify realpath prerequisite and path comparison
Agent-Logs-Url: https://github.com/open-edge-platform/image-composer-tool/sessions/41236530-0008-43cf-bb4d-a72a9887eed1 Co-authored-by: magerstam <77846379+magerstam@users.noreply.github.com>
1 parent 33d9e62 commit 9d0bca3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/cleanup_workspace

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ MAX_UMOUNT_PASSES=5
1111
FORCE_DELETE=false
1212

1313
if ! command -v realpath >/dev/null 2>&1; then
14-
echo "realpath command is required but not found" >&2
14+
echo "realpath command is required but not found. Install coreutils or ensure realpath is in PATH." >&2
1515
exit 1
1616
fi
1717

@@ -117,6 +117,7 @@ if [[ "$WORKSPACE_DIR" == "/" ]]; then
117117
fi
118118

119119
if [[ "$WORKSPACE_DIR" != "$DEFAULT_WORKSPACE_DIR" && "$FORCE_DELETE" != true ]]; then
120+
# Both paths are canonicalized via realpath -m before this comparison.
120121
echo "Refusing to remove non-default workspace directory without --force: $WORKSPACE_DIR" >&2
121122
exit 1
122123
fi

0 commit comments

Comments
 (0)