build: fix package linking

This commit is contained in:
Johannes Loher 2022-01-31 18:23:53 +01:00
parent a083732b84
commit dd9e30f8a1

View file

@ -7,7 +7,7 @@ import path from "node:path";
import yargs from "yargs";
import { hideBin } from "yargs/helpers";
import { destinationDirectory, distDirectory, foundryconfigFile, name, sourceDirectory } from "./const.js";
import { destinationDirectory, distDirectory, foundryconfigFile, name } from "./const.js";
/**
* Get the data path of Foundry VTT based on what is configured in the {@link foundryconfigFile}.
@ -29,7 +29,7 @@ function getDataPath() {
* @param {boolean} clean Whether to remove the link instead of creating it
*/
async function linkPackage(clean) {
if (!fs.existsSync(path.resolve(sourceDirectory, "system.json"))) {
if (!fs.existsSync(path.resolve("system.json"))) {
throw new Error("Could not find system.json");
}