11 lines
383 B
JavaScript
11 lines
383 B
JavaScript
import { execFile } from "node:child_process";
|
|
import { promisify } from "node:util";
|
|
|
|
const execFileAsync = promisify(execFile);
|
|
|
|
export async function selectProjectFolder() {
|
|
const script = 'POSIX path of (choose folder with prompt "Select project folder")';
|
|
const { stdout } = await execFileAsync("/usr/bin/osascript", ["-e", script]);
|
|
return String(stdout ?? "").trim();
|
|
}
|