nextflow icon indicating copy to clipboard operation
nextflow copied to clipboard

Unexpected warning message

Open pditommaso opened this issue 2 years ago • 2 comments

After upgrading to JGit 6.1, the following warn message is reported in the log file.

Jun-08 19:01:52.220 [main] WARN  org.eclipse.jgit.util.FS - Cannot run program "[?7h/usr/bin/git" (in directory "[?7h/usr/bin"): error=2, No such file or directory

It should be investigated the reason for this message and how to avoid it

pditommaso avatar Jun 08 '22 17:06 pditommaso

it seems only to happen in Mac and if git is not in /usr/bin

in version 5 they only check if the file is present but from version 6 it seems the library is trying to execute before validating the path:

DEFAULT_GIT_LOCATION is a String = '/usr/bin/git'

protected File discoverGitExe() {
		String path = SystemReader.getInstance().getenv("PATH"); //$NON-NLS-1$
		File gitExe = searchPath(path, "git"); //$NON-NLS-1$

		if (SystemReader.getInstance().isMacOS()) {
			if (gitExe == null
					|| DEFAULT_GIT_LOCATION.equals(gitExe.getPath())) {
				if (searchPath(path, "bash") != null) { //$NON-NLS-1$
					// On MacOSX, PATH is shorter when Eclipse is launched from the
					// Finder than from a terminal. Therefore try to launch bash as a
					// login shell and search using that.
					try {
						String w = readPipe(userHome(),
							new String[]{"bash", "--login", "-c", "which git"}, // //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
                                         ....

                                        } catch (CommandFailedException e) {
						LOG.warn(e.getMessage());
					}

jorgeaguileraseqera avatar Jun 20 '22 15:06 jorgeaguileraseqera

Weird that jgit tries to use git !

pditommaso avatar Jun 20 '22 15:06 pditommaso

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Dec 21 '22 01:12 stale[bot]

Looks solved

pditommaso avatar Dec 21 '22 07:12 pditommaso