public static boolean deletePath(Path path, boolean quiet) {
		Exception[] err = new Exception[] { null };
		try {
			if (Files.isDirectory(path)) {
				verboseMsg("Deleting folder " + path);
				try (Stream<Path> s = Files.walk(path)) {
					s.sorted(Comparator.reverseOrder())
						.forEach(f -> {
							try {
								Files.delete(f);
							} catch (IOException e) {
								err[0] = e;
							}
						});
				}
			} else if (Files.exists(path)) {
				verboseMsg("Deleting file " + path);
				Files.delete(path);
			} else if (Files.exists(path, LinkOption.NOFOLLOW_LINKS)) {
				Util.verboseMsg("Deleting broken link " + path);
				Files.delete(path);
			}
		} catch (IOException e) {
			err[0] = e;
		}
		if (!quiet && err[0] != null) {
			throw new ExitException(-1, "Could not delete " + path.toString(), err[0]);
		}
		return err[0] == null;
	}
Runs the given command + arguments and returns its output (both stdout and
stderr) as a string

@param cmd The command to execute
@return The output of the command or null if anything went wrong
src/main/java/dev/jbang/util/Util.java