Skip to content

Jansi in restricted Windows environment #1106

@charphi

Description

@charphi

Jansi prevents applications from running in some restricted Windows environments.
The problem is that AppLocker can forbid loading of non-signed libraries from the Windows temporary folder.

Currently, Jansi extracts a dll to the temporary folder of Windows as soon as one of its class is loaded. The method CommandLine.Help.Ansi#isJansiConsoleInstalled() triggers this behavior even if AnsiConsole.systemInstall() is not called.

One possible solution would be to add a system property that disable jansi loading such as jansi.disable with the following code:

static boolean isJansiConsoleInstalled() {
  if (Boolean.parseBoolean(System.getProperty("jansi.disable", false)) {
    return false;
  }
  ...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    theme: integrationAn issue or change related to integration with other frameworks, shells or operating systemstype: enhancement ✨

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions