Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.
This repository was archived by the owner on Sep 3, 2025. It is now read-only.

Way to get whether the grgit initialization was successful from the service #362

@Vampire

Description

@Vampire

It would be nice if the GrgitService would have a way to determine whether grgit could be initialized or not instead of having a hard failure on get()-ing the service from the provider.
This makes using the grgit-service plugin a bit cumbersome.
You would currenltly use some construct like

val grgit by lazy(NONE) {
    runCatching {
        grgitService.service.get().grgit
    }.getOrNull()
}

It would be nicer if the service initialization would not fail and instead the service provides the information whether grgit is available, for example by returning a null value like with the grgit plugin.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions