public static String pathToString(Path path) {
		if (isWindows() && getShell() == Shell.bash) {
			StringBuilder str = new StringBuilder();
			if (path.isAbsolute()) {
				if (path.getRoot().toString().endsWith(":\\")) {
					// Convert `x:` to `/x/`
					str.append("/").append(path.getRoot().toString().charAt(0)).append("/");
				} else {
					// Convert `\\server\share` to `//server/share`
					str.append(path.getRoot().toString().replace("\\", "/"));
				}
				for (int i = 0; i < path.getNameCount(); i++) {
					if (i > 0) {
						str.append("/");
					}
					str.append(path.getName(i).toString());
				}
			}
			return str.toString();
		} else {
			return path.toString();
		}
	}
Converts a Path to a String. This is normally a trivial operation, but this
method handles the special case when running in a Bash shell on Windows,
where paths have a special format that Java doesn't know about (eg.
C:\Directory\File.txt becomes /c/Directory/File.txt).

@param path the Path to convert
@return a String representing the given Path
src/main/java/dev/jbang/util/Util.java