Skip to content

Commit fd145d2

Browse files
Copilotmagerstam
andauthored
fix(scripts): send cleanup_workspace errors to stderr
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 920a151 commit fd145d2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

scripts/cleanup_workspace

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ while [[ $# -gt 0 ]]; do
6161
case $1 in
6262
--workspace-dir)
6363
if [[ $# -lt 2 ]]; then
64-
echo "Error: --workspace-dir requires a value"
64+
echo "Error: --workspace-dir requires a value" >&2
6565
usage
6666
exit 1
6767
fi
@@ -70,7 +70,7 @@ while [[ $# -gt 0 ]]; do
7070
;;
7171
--max-umount-passes)
7272
if [[ $# -lt 2 ]]; then
73-
echo "Error: --max-umount-passes requires a value"
73+
echo "Error: --max-umount-passes requires a value" >&2
7474
usage
7575
exit 1
7676
fi
@@ -94,17 +94,17 @@ while [[ $# -gt 0 ]]; do
9494
done
9595

9696
if ! WORKSPACE_DIR="$(realpath -m "$WORKSPACE_DIR" 2>/dev/null)"; then
97-
echo "Failed to resolve workspace directory path: $WORKSPACE_DIR"
97+
echo "Failed to resolve workspace directory path: $WORKSPACE_DIR" >&2
9898
exit 1
9999
fi
100100

101101
if [[ "$WORKSPACE_DIR" == "/" ]]; then
102-
echo "Refusing to remove root directory"
102+
echo "Refusing to remove root directory" >&2
103103
exit 1
104104
fi
105105

106106
if [[ "$WORKSPACE_DIR" != "$REPO_ROOT/workspace" && "$FORCE_DELETE" != true ]]; then
107-
echo "Refusing to remove non-default workspace directory without --force: $WORKSPACE_DIR"
107+
echo "Refusing to remove non-default workspace directory without --force: $WORKSPACE_DIR" >&2
108108
exit 1
109109
fi
110110

0 commit comments

Comments
 (0)