File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
packages/site-kit/src/lib/markdown Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 11import MagicString from 'magic-string' ;
22import { createHash , Hash } from 'node:crypto' ;
33import fs from 'node:fs' ;
4+ import process from 'node:process' ;
45import path from 'node:path' ;
56import ts from 'typescript' ;
67import * as marked from 'marked' ;
@@ -34,8 +35,13 @@ const hash = createHash('sha256');
3435hash . update ( fs . readFileSync ( '../../pnpm-lock.yaml' , 'utf-8' ) ) ;
3536// CAREFUL: update this URL in case you ever move this file or start the dev/build process from another directory
3637const original_file = '../../packages/site-kit/src/lib/markdown/renderer.ts' ;
37- if ( fs . existsSync ( original_file ) ) {
38- throw new Error ( 'Update the path to the markdown renderer code. Current value: ' + original_file ) ;
38+ if ( ! fs . existsSync ( original_file ) ) {
39+ throw new Error (
40+ 'Update the path to the markdown renderer code. Current value: ' +
41+ original_file +
42+ ' | Current cwd: ' +
43+ process . cwd ( )
44+ ) ;
3945}
4046hash_graph ( hash , fileURLToPath ( original_file ) ) ;
4147const digest = hash . digest ( ) . toString ( 'base64' ) . replace ( / \/ / g, '-' ) ;
You can’t perform that action at this time.
0 commit comments