@Override
	public Integer doCall() throws IOException {

		// force download sources when editing
		Util.setDownloadSources(true);

		if (!sandbox) {
			File location;
			if (scriptMixin.scriptOrFile != null) {
				location = new File(scriptMixin.scriptOrFile);
			} else {
				location = null;
			}
			info("Assuming your editor have JBang support installed. See https://jbang.dev/ide");
			info("If you prefer to open in a sandbox run with `jbang edit -b` instead.");
			Path path = null;
			if (location == null) {
				path = locateProjectDir(Paths.get("."));
			} else {
				path = locateProjectDir(location.toPath());
			}
			if (path != null && ((location != null) && !path.equals(location.toPath()))) {
				additionalFiles.add(0, pathToString(location.toPath()));
			}

			if (!noOpen) {
				openEditor(pathToString(path), additionalFiles);
			}
			System.out.println(path);
		} else {
			scriptMixin.validate(false);
			File location = new File(scriptMixin.scriptOrFile);
			info("Creating sandbox for script editing " + location);
			ProjectBuilder pb = createProjectBuilder();
			final Project prj = pb.build(scriptMixin.scriptOrFile);

			if (prj.isJar() || prj.getMainSourceSet().getSources().isEmpty()) {
				throw new ExitException(EXIT_INVALID_INPUT, "You can only edit source files");
			}

			Path project = createProjectForLinkedEdit(prj, Collections.emptyList(), false);
			String projectPathString = pathToString(project.toAbsolutePath());
			// err.println(project.getAbsolutePath());

			if (!noOpen) {
				openEditor(projectPathString, additionalFiles);
			}

			if (!live) {
				out.println(projectPathString); // quit(project.getAbsolutePath());
			} else {
				Path orginalFile = prj.getResourceRef().getFile();
				if (!Files.exists(orginalFile)) {
					throw new ExitException(EXIT_UNEXPECTED_STATE,
							"Cannot live edit " + prj.getResourceRef().getOriginalResource());
				}
				watchForChanges(orginalFile, () -> {
					// TODO only regenerate when dependencies or file/resource refs changes.
					info("Regenerating project.");
					try {
						ProjectBuilder pblive = createProjectBuilder();
						Project prjlive = pblive.build(scriptMixin.scriptOrFile);
						createProjectForLinkedEdit(prjlive, Collections.emptyList(), true);
					} catch (IOException e) {
						throw new RuntimeException(e);
					}
					return null;
				});
			}
		}
		return EXIT_OK;
	}
Returns a parent path if one of the targetFileNames exist in such parent.

@param filePath
@param targetFileNames list of markers to search for
@return if found returns the marker path, if none found return null.
src/main/java/dev/jbang/cli/Edit.java