Fix bug for non existent data folder
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Fabian Stamm 2020-07-28 15:56:02 +02:00
parent 65f1c52581
commit 5421f8642e
3 changed files with 6 additions and 1 deletions

1
registry/.gitignore vendored
View File

@ -1,2 +1,3 @@
tmp/
data/
config.ini

View File

@ -1,8 +1,10 @@
import { Ini } from "./deps.ts";
import { FS } from "./deps.ts";
const config =
Ini.decode(
await Deno.readFile("./data/config.ini")
await Deno.readFile("./config.ini")
.then((e) => new TextDecoder().decode(e))
.catch((err) => {
if (!(err instanceof Deno.errors.NotFound)) {

View File

@ -1,4 +1,6 @@
import { Datastore } from "./deps.ts";
import { FS } from "./deps.ts";
await FS.ensureDir("./data");
export interface IPackage {
name: string;