Skip to content

Commit 962fbc1

Browse files
use relative path
1 parent d62dc1a commit 962fbc1

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

  • src/tasks/cwv-demo-suggestions-processor

src/tasks/cwv-demo-suggestions-processor/handler.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,8 @@ async function updateSuggestionWithGenericIssues(
101101

102102
try {
103103
const filename = fileURLToPath(import.meta.url);
104-
const dirname = join(filename, '..', '..', '..', '..', '..');
105-
const CWV_SUGGESTIONS_FILE_PATH = join(dirname, 'static', 'aem-best-practices.json');
104+
const CWV_SUGGESTIONS_FILE_PATH = join(filename, '..', '..', '..', 'static', 'aem-best-practices.json');
106105
logger.info(`Loading CWV suggestions from: ${CWV_SUGGESTIONS_FILE_PATH}`);
107-
// Debug: Log the path resolution for troubleshooting
108-
logger.debug('Debug - filename:', filename);
109-
logger.debug('Debug - dirname:', dirname);
110-
logger.debug('Debug - CWV_SUGGESTIONS_FILE_PATH:', CWV_SUGGESTIONS_FILE_PATH);
111106

112107
const jsonContent = readFileSync(CWV_SUGGESTIONS_FILE_PATH, 'utf8');
113108
cwvReferenceSuggestions = JSON.parse(jsonContent);

0 commit comments

Comments
 (0)