fix doric-cli error
This commit is contained in:
parent
0e430cc342
commit
7e4b7258e7
@ -61,10 +61,14 @@ async function doMerge(jsFile: string) {
|
|||||||
|
|
||||||
export async function mergeMap(mapFile: string) {
|
export async function mergeMap(mapFile: string) {
|
||||||
const mapContent = await fs.promises.readFile(mapFile, "utf-8");
|
const mapContent = await fs.promises.readFile(mapFile, "utf-8");
|
||||||
|
try {
|
||||||
if (JSON.parse(mapContent).merged) {
|
if (JSON.parse(mapContent).merged) {
|
||||||
console.log("Already merged");
|
console.log("Already merged");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.error(err);
|
||||||
|
}
|
||||||
const lockFile = `${mapFile}.lock`;
|
const lockFile = `${mapFile}.lock`;
|
||||||
if (fs.existsSync(lockFile)) {
|
if (fs.existsSync(lockFile)) {
|
||||||
console.log("In mergeMap,skip")
|
console.log("In mergeMap,skip")
|
||||||
|
Reference in New Issue
Block a user