Skip to content

Fix DOMAINSUFFIX being set to echo "Finished"; when running via curl | bash#57

Merged
peterjaap merged 2 commits intomainfrom
copilot/fix-invalid-identifier-finished
Mar 13, 2026
Merged

Fix DOMAINSUFFIX being set to echo "Finished"; when running via curl | bash#57
peterjaap merged 2 commits intomainfrom
copilot/fix-invalid-identifier-finished

Conversation

Copy link
Contributor

Copilot AI commented Mar 13, 2026

When running the install script via curl | bash, the dev setup script's suffix() function reads from stdin to prompt for DOMAINSUFFIX. Since bash is also reading the script from that same stdin pipe, dev setup consumes the remaining unread script bytes — ending up with echo "Finished"; stored as the DOMAINSUFFIX value.

The root cause: DOMAINSUFFIX=.localhost was prefixed to egrep (the first command in the pipeline), not to dev setup. In shell, VAR=value cmd scopes the variable only to that command, so dev setup never received it and fell back to read.

Change

Move DOMAINSUFFIX=.localhost from egrep to dev setup:

# Before
|| DOMAINSUFFIX=.localhost egrep 'php[0-9][0-9]:' "$(DOCKER_COMPOSE_DEVELOPMENT)/docker-compose.yml" \
    | grep -v '-' | sort -ru | awk '{gsub(":","",$1); print $1}' | head -1 \
    | "$(DOCKER_COMPOSE_DEVELOPMENT)/bin/dev" setup

# After
|| egrep 'php[0-9][0-9]:' "$(DOCKER_COMPOSE_DEVELOPMENT)/docker-compose.yml" \
    | grep -v '-' | sort -ru | awk '{gsub(":","",$1); print $1}' | head -1 \
    | DOMAINSUFFIX=.localhost "$(DOCKER_COMPOSE_DEVELOPMENT)/bin/dev" setup

With DOMAINSUFFIX set in its environment, dev setup's suffix() function short-circuits and skips the read, writing DOMAINSUFFIX=.localhost correctly to .env.

Original prompt

This section details on the original issue you should resolve

<issue_title>"Finished" is not a valid identifier</issue_title>
<issue_description>Completely clean install, Ubuntu 21.10</issue_description>

Comments on the Issue (you are @copilot in this section)

@peterjaap ![image](https://user-images.githubusercontent.com/431360/140480720-5e3a5e86-6687-4f5c-b43c-b9b2f7a12c6d.png) @peterjaap `cat ~/development/.env`
DOMAINSUFFIX=echo "Finished";
MYSQL_ROOT_PASSWORD=aslfkdasdlkfsdlfsdlfalfad

DOMAINSUFFIX should be;

DOMAINSUFFIX=.localhost

Something doesnt play nice with https://github.com/JeroenBoersma/docker-compose-development/blob/e83302ea2a040a2030580096e972e9ef68291ab9/bin/dev_command/setup#L85</comment_new>


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: peterjaap <431360+peterjaap@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix invalid identifier issue for DOMAINSUFFIX Fix DOMAINSUFFIX being set to echo "Finished"; when running via curl | bash Mar 13, 2026
Copilot AI requested a review from peterjaap March 13, 2026 14:28
@peterjaap peterjaap marked this pull request as ready for review March 13, 2026 14:35
@peterjaap peterjaap merged commit b306d3c into main Mar 13, 2026
0 of 2 checks passed
@peterjaap peterjaap deleted the copilot/fix-invalid-identifier-finished branch March 13, 2026 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"Finished" is not a valid identifier

2 participants