Skip to content

Commit a72c93e

Browse files
committed
Merge remote-tracking branch 'origin/main' into feat/scripts-agent-tools
2 parents 977e819 + 2326ee3 commit a72c93e

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

‎install.sh‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,10 @@ install_binary_and_alias() (
233233
committed=1
234234
)
235235

236-
mkdir -p "$INSTALL_DIR"
236+
if ! mkdir -p "$INSTALL_DIR"; then
237+
print_message error "Could not create the install directory ${INSTALL_DIR}" >&2
238+
exit 1
239+
fi
237240

238241
if [[ -n "$local_binary" ]]; then
239242
print_message info "Using local binary: $local_binary"
@@ -295,7 +298,12 @@ if [[ "${SHELL:-}" == */fish ]]; then
295298
path_check="$path_line"
296299
fi
297300
if [[ -n "$shell_rc" ]] && ! grep -qF "$path_check" "$shell_rc" 2>/dev/null; then
298-
mkdir -p "$(dirname "$shell_rc")"
301+
# Name the directory ourselves: some mkdir builds (uutils on Ubuntu 26.04)
302+
# report only "Not a directory" without the path.
303+
if ! mkdir -p "$(dirname "$shell_rc")"; then
304+
print_message error "Could not create $(dirname "$shell_rc") for ${shell_rc}" >&2
305+
exit 1
306+
fi
299307
echo "" >> "$shell_rc"
300308
echo "# Coven Code" >> "$shell_rc"
301309
echo "$path_line" >> "$shell_rc"

0 commit comments

Comments
 (0)