void (@NotNull GeneralCommandLine cmd) { if (!WslDistributionDescriptor.isCalculatingMountRootCommand(cmd) && cmd.getUserData(NEVER_RUN_TTY_FIX) == null // ttyfix not disabled explicitly // Even though mount root is calculated with `options.isExecuteCommandInShell()=false`, // let's protect from possible infinite recursion. && !(cmd instanceof PtyCommandLine) // PTY command line has correct tty size && Registry.is("wsl.fix.initial.tty.size.when.running.without.tty", true)) { var ttyfix = AbstractWslDistributionKt.getToolLinuxPath(this, "ttyfix"); cmd.addParameter(ttyfix); } }