Skip to content

Commit

Permalink
[Bug] Fix the error that occurs when executing clear on an empty ware…
Browse files Browse the repository at this point in the history
…house (#16507)

Fix the error that occurs when executing clear on an empty warehouse
  • Loading branch information
VisualSJ authored Nov 14, 2023
1 parent c41807c commit 409b540
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion scripts/clear-cache.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
const fs = require('fs');
const path = require('path');
const readline = require('readline');
const { magenta } = require('chalk');

let magenta;
try {
magenta = require('chalk').magenta;
} catch (error) {
magenta = (str) => str;
}

const prefix = ''.padStart(20, '=');
console.log(magenta(`${prefix} Clear cache ${prefix}`));
Expand Down

0 comments on commit 409b540

Please sign in to comment.