Skip to content

Conversation

@featheredtoast
Copy link
Member

download, checksum and use https://github.com/discourse/launcher

support update arg to re-download launcher binary.

keep most of the prereqs function in place. Use hello-world image to check docker install.

check for autocompletion and squelch output if we're calling autocomplete.

Remove checks on config existence and config permissions. If we need this check it should go into the launcher app.

update overlay check to include overlayfs which is what comes up on default latest docker on desktop versions

@featheredtoast
Copy link
Member Author

The reason for the original complicated flow control logic was an attempt to squelch messaging to stdout for autocompletion messaging (IE, so source <(./launcher sh) can work as intended.) I've updated all messages to pipe to stderr to simplify.

Additionally:
Removed the redundant uname check
Added the proper md5 hash check
Fixed the call to check prereqs. Attached a dummy stdin via /dev/null for checking if attaching stdin/stdout/stderr work for docker.

@featheredtoast featheredtoast force-pushed the update-launcher branch 2 times, most recently from 1bbfc24 to e61df07 Compare August 1, 2025 21:37
Copy link
Member

@andrewschleifer andrewschleifer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whitespace issues, otherwise LGTM.

Comment on lines 182 to 193
case "$1" in
update)
echo "updating launcher..." >&2
update
exit 0
;;
*)
test -f "${BINDIR}/launcher" || update
echo "run ./launcher update to update launcher" >&2
check_prereqs
exec "${BINDIR}/launcher" "$@"
esac
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This case statement uses mixed tabs and spaces for indentation.

download, checksum and use https://github.com/discourse/launcher

support update arg to re-download launcher binary.

keep most of the prereqs function in place.

check for autocompletion and squelch output if we're calling autocomplete.

Remove checks on config existence and config permissions. If we need this check
it should go into the launcher app.

update overlay check to include overlayfs which is what comes up on default latest
docker on desktop versions
Ignore check prereqs with $COMP_LINE for autcomplete support.
* Remove discourse docker image download check - this is done in launcher.
* update attach check, attach </dev/null for stdin, this can cause open file
descriptors to hang around when run when `source`-ing the script.
Reserve stdout for autocompletion. Update the last message to stderr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants