Skip to content

Commit cab3597

Browse files
committed
Fix: linux needs -T for piped input, use parms instead
1 parent 1d781c1 commit cab3597

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

init_runestone.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -987,8 +987,9 @@ add_book_to_db() {
987987
print_step "Adding book to database..."
988988

989989
# Run the addbookauthor command interactively
990-
# We'll provide the inputs via echo pipe
991-
if echo -e "${book_name}\ntestuser1" | docker compose run --rm rsmanage rsmanage addbookauthor; then
990+
# Instead of providing the inputs by pipe, use the parameters directly, which is supported by the command and more reliable than simulating interactive input
991+
# using interactive intput would require -T on the run command, which can cause issues with some environments and is less efficient
992+
if docker compose run --rm rsmanage rsmanage addbookauthor --book "${book_name}" --author "testuser1"; then
992993
print_success "Book added to database"
993994
log "Added book $book_name to database"
994995
else

0 commit comments

Comments
 (0)