Skip to content

Commit

Permalink
Rename variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Milly committed Jun 29, 2022
1 parent 4d97fb7 commit 1fb45b9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/cli/format.js
Expand Up @@ -408,7 +408,7 @@ async function formatFiles(context) {
const isDifferent = output !== input;

// Only set formatted cache if with --write or no-different.
let isCacheSet = context.argv.write || !isDifferent;
let shouldCacheSet = context.argv.write || !isDifferent;

if (printedFilename) {
// Remove previously printed filename to log it with duration.
Expand Down Expand Up @@ -439,7 +439,7 @@ async function formatFiles(context) {
);

// Don't set cache if file writing failed
isCacheSet = false;
shouldCacheSet = false;

// Don't exit the process if one file failed
/* istanbul ignore next */
Expand All @@ -464,7 +464,7 @@ async function formatFiles(context) {
writeOutput(context, result, options);
}

if (isCacheSet) {
if (shouldCacheSet) {
formatResultsCache?.setFormatResultsCache(filename, options);
} else {
formatResultsCache?.removeFormatResultsCache(filename);
Expand Down

0 comments on commit 1fb45b9

Please sign in to comment.