Fix bug for non existent data folder
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
65f1c52581
commit
5421f8642e
1
registry/.gitignore
vendored
1
registry/.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
tmp/
|
tmp/
|
||||||
data/
|
data/
|
||||||
|
config.ini
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
import { Ini } from "./deps.ts";
|
import { Ini } from "./deps.ts";
|
||||||
|
|
||||||
|
import { FS } from "./deps.ts";
|
||||||
|
|
||||||
const config =
|
const config =
|
||||||
Ini.decode(
|
Ini.decode(
|
||||||
await Deno.readFile("./data/config.ini")
|
await Deno.readFile("./config.ini")
|
||||||
.then((e) => new TextDecoder().decode(e))
|
.then((e) => new TextDecoder().decode(e))
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
if (!(err instanceof Deno.errors.NotFound)) {
|
if (!(err instanceof Deno.errors.NotFound)) {
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
import { Datastore } from "./deps.ts";
|
import { Datastore } from "./deps.ts";
|
||||||
|
import { FS } from "./deps.ts";
|
||||||
|
await FS.ensureDir("./data");
|
||||||
|
|
||||||
export interface IPackage {
|
export interface IPackage {
|
||||||
name: string;
|
name: string;
|
||||||
|
Loading…
Reference in New Issue
Block a user