[Bug]: --auth option not usable because ensureExposeSetup()
- Dominant language
- PHP
- Stars
- 4.6k
- Forks
- 308
- PR merge metrics
- No merged PRs in 30d
Description
### System architecture
Mac, Intel (x86)
### PHP Version
PHP 8.3.20 (cli) (built: Jun 11 2025 18:01:02) (NTS)
### Bug description
Hi 👋
In the current release of Expose 3.0.3 the `share` command’s `--auth` flag seems broken.
Code reference: `ShareCommand::handle()` calls `ensureExposeSetup()` *before* reading the `--auth` option.
That means:
1. `ensureExposeSetup()` aborts if `config('expose.auth_token')` is empty.
2. Even if I pass `--auth=MYTOKEN` on the CLI, the command exits with:
"No authentication token set."
Expected behavior:
- Passing `--auth` should allow running Expose without needing a config file.
- `ensureExposeSetup()` should probably run *after* merging CLI options and config.
Thanks for looking into it!
### Steps to reproduce
```bash
expose share http://127.0.0.1:5500 --auth=MYTOKEN
> Expose
No authentication token set.
### Relevant log output
```shell
```
Contributor guide
Assessment
This issue has not been assessed yet.