diff --git a/src/editor/bin/Oni2.re b/src/editor/bin/Oni2.re index 59a56bce89..a3f5ec2cd8 100644 --- a/src/editor/bin/Oni2.re +++ b/src/editor/bin/Oni2.re @@ -40,6 +40,8 @@ let init = app => { let cliOptions = Core.Cli.parse(setup); Sys.chdir(cliOptions.folder); + PreflightChecks.run(); + let currentState = ref(Model.State.create()); let onStateChanged = v => { diff --git a/src/editor/bin/PreflightChecks.re b/src/editor/bin/PreflightChecks.re new file mode 100644 index 0000000000..c6d11fda23 --- /dev/null +++ b/src/editor/bin/PreflightChecks.re @@ -0,0 +1,17 @@ +/* + * PreflightChecks.re + * + * This establishes and verifies a set of invariants to ensure the environment + * is set up correctly for the application to run. + */ + +open Oni_Core; + +let checkHomeDirectoryOrThrow = () => { + let _ = Filesystem.unsafeFindHome(); + (); +}; + +let run = () => { + checkHomeDirectoryOrThrow(); +};