(app: OpenApp)
| 252 | } |
| 253 | |
| 254 | const openDir = (app: OpenApp) => { |
| 255 | if (opening() || !canOpen() || !platform.openPath) return |
| 256 | const directory = projectDirectory() |
| 257 | if (!directory) return |
| 258 | |
| 259 | const item = options().find((o) => o.id === app) |
| 260 | const openWith = item && "openWith" in item ? item.openWith : undefined |
| 261 | setOpenRequest("app", app) |
| 262 | platform |
| 263 | .openPath(directory, openWith) |
| 264 | .catch((err: unknown) => showRequestError(language, err)) |
| 265 | .finally(() => { |
| 266 | setOpenRequest("app", undefined) |
| 267 | }) |
| 268 | } |
| 269 | |
| 270 | const copyPath = () => { |
| 271 | const directory = projectDirectory() |
no test coverage detected