Skip to content

fix: Handle running CLI in headless environment#95

Merged
LisoUseInAIKyrios merged 1 commit intoMorpheApp:devfrom
prateek-who:headless-fix
Mar 28, 2026
Merged

fix: Handle running CLI in headless environment#95
LisoUseInAIKyrios merged 1 commit intoMorpheApp:devfrom
prateek-who:headless-fix

Conversation

@prateek-who
Copy link
Copy Markdown
Contributor

When the jar file is run, it checks if it is running in a headless environment. In case it is, it falls back to cli entry even if no args are passed (this would previously try to load the gui, fail and then throw an error).

@prateek-who
Copy link
Copy Markdown
Contributor Author

Is this fix enough? Or do we need to check for more stuff?

@LisoUseInAIKyrios
Copy link
Copy Markdown
Contributor

If what is here fixes the problem then this looks great.

@prateek-who
Copy link
Copy Markdown
Contributor Author

It does fix it.

I have a local ubunut server running and when I tried to run the command that the user had provided, I had the same error. So, essentially it was a "trying to run gui in headless error". This got me wondering if there are any other ways people are trying to run the cli in and we are failing to acknowledge that properly?

@LisoUseInAIKyrios
Copy link
Copy Markdown
Contributor

What other ways might they run cli? I think everything may be covered now.

@LisoUseInAIKyrios LisoUseInAIKyrios changed the title fix: Headless environment fix fix: Handle running CLI in headless environment Mar 28, 2026
@prateek-who
Copy link
Copy Markdown
Contributor Author

fair, I don't think there is any either

@LisoUseInAIKyrios LisoUseInAIKyrios merged commit 70f2952 into MorpheApp:dev Mar 28, 2026
3 checks passed
@LisoUseInAIKyrios LisoUseInAIKyrios linked an issue Mar 28, 2026 that may be closed by this pull request
2 tasks
github-actions bot pushed a commit that referenced this pull request Mar 28, 2026
## [1.6.3-dev.3](v1.6.3-dev.2...v1.6.3-dev.3) (2026-03-28)

### Bug Fixes

* Handle running CLI in headless environment ([#95](#95)) ([70f2952](70f2952))
@prateek-who prateek-who deleted the headless-fix branch March 28, 2026 12:26
github-actions bot pushed a commit that referenced this pull request Mar 28, 2026
## [1.6.3](v1.6.2...v1.6.3) (2026-03-28)

### Bug Fixes

* Handle patching XAPK files ([#93](#93)) ([5d18490](5d18490))
* Handle running CLI in headless environment ([#95](#95)) ([70f2952](70f2952))
* Update to latest Patcher ([fbc6c9e](fbc6c9e))
* Update to Patcher 1.3.3 ([ca579fb](ca579fb))
AzyrRuthless pushed a commit to AzyrRuthless/morphe-cli that referenced this pull request Mar 29, 2026
github-actions bot pushed a commit to AzyrRuthless/morphe-cli that referenced this pull request Mar 29, 2026
## [1.4.1-dev.1](v1.4.0...v1.4.1-dev.1) (2026-03-29)

### Bug Fixes

* Handle patching XAPK files ([MorpheApp#93](https://github.com/AzyrRuthless/morphe-cli/issues/93)) ([1dc7cfe](1dc7cfe))
* Handle running CLI in headless environment ([MorpheApp#95](https://github.com/AzyrRuthless/morphe-cli/issues/95)) ([1e30218](1e30218))
* Update to latest Patcher ([2414325](2414325))
* Update to Patcher 1.3.3 ([ad7a0a0](ad7a0a0))
github-actions bot pushed a commit to AzyrRuthless/morphe-cli that referenced this pull request Mar 29, 2026
## [1.4.1](v1.4.0...v1.4.1) (2026-03-29)

### Bug Fixes

* Handle patching XAPK files ([MorpheApp#93](https://github.com/AzyrRuthless/morphe-cli/issues/93)) ([1dc7cfe](1dc7cfe))
* Handle running CLI in headless environment ([MorpheApp#95](https://github.com/AzyrRuthless/morphe-cli/issues/95)) ([1e30218](1e30218))
* Update to latest Patcher ([2414325](2414325))
* Update to Patcher 1.3.3 ([ad7a0a0](ad7a0a0))
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.

bug: Error when running in docker: java.awt.HeadlessException:

2 participants