Skip to content

Commit e04c462

Browse files
Frank Guoclaude
andcommitted
fix: auto-add PATH in non-interactive install
When piped from curl, the installer can't prompt interactively. Instead of printing the export line and hoping the user notices, auto-append to the detected shell profile. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d64c2d5 commit e04c462

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

scripts/install.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,18 @@ main() {
224224
;;
225225
esac
226226
else
227-
echo ""
228-
echo -e " ${DIM}Add to PATH to run rekal from anywhere:${NC}"
229-
echo -e " ${BOLD}${export_line}${NC}"
227+
if [[ -n "$shell_profile" ]]; then
228+
echo "" >> "$shell_profile"
229+
echo "# rekal" >> "$shell_profile"
230+
echo "$export_line" >> "$shell_profile"
231+
echo ""
232+
success "Added to ${BOLD}${shell_profile}${NC}"
233+
info "Run ${BOLD}source ${shell_profile}${NC} or open a new terminal."
234+
else
235+
echo ""
236+
echo -e " ${DIM}Add to PATH to run rekal from anywhere:${NC}"
237+
echo -e " ${BOLD}${export_line}${NC}"
238+
fi
230239
fi
231240
fi
232241

0 commit comments

Comments
 (0)