unyt-org / uix

The UIX Framework
https://uix.unyt.org
MIT License
54 stars 3 forks source link

[Uncaught Promise] `uix --init`: ENOENT when git is not installed #146

Closed asbng closed 3 months ago

asbng commented 3 months ago

🕗 Version & Regression Information

UIX v0.2.6

💻 Code

uix --init

🙁 Actual behavior

When git is not installed on the system or not found on the PATH, the following error is thrown:

Uncaught promise: Promise {
  <rejected> NotFound: No such file or directory (os error 2)
    at opRun (ext:runtime/40_process.js:58:10)
    at Object.run (ext:runtime/40_process.js:155:15)
    at initBaseProject (https://cdn.unyt.org/uix/src/utils/init-base-project.ts:28:21)
    at eventLoopTick (ext:core/01_core.js:169:7)
    at async https://cdn.unyt.org/uix/run.ts:39:7 {
    name: "NotFound",
    code: "ENOENT"
  }
}
error: Uncaught (in promise) NotFound: No such file or directory (os error 2)
    const clone = Deno.run({
                       ^
    at opRun (ext:runtime/40_process.js:58:10)
    at Object.run (ext:runtime/40_process.js:155:15)
    at initBaseProject (https://cdn.unyt.org/uix/src/utils/init-base-project.ts:28:21)
    at eventLoopTick (ext:core/01_core.js:169:7)
    at async https://cdn.unyt.org/uix/run.ts:39:7

🙂 Expected behavior

Error handling according to #144

Additional information about the issue

No response