From ba37c36ad9e4d7bf6e2e002e0b5e642c6691ab19 Mon Sep 17 00:00:00 2001 From: Michael Kauzmann Date: Mon, 8 May 2023 09:46:16 -0600 Subject: [PATCH] support if chipper/dist doesn't exist, https://github.com/phetsims/chipper/issues/946 --- js/grunt/reopenIssuesFromTODOs.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/js/grunt/reopenIssuesFromTODOs.js b/js/grunt/reopenIssuesFromTODOs.js index 6168d51b..1a064621 100644 --- a/js/grunt/reopenIssuesFromTODOs.js +++ b/js/grunt/reopenIssuesFromTODOs.js @@ -8,6 +8,10 @@ const Octokit = require( '@octokit/rest' ); // eslint-disable-line require-state const execute = require( '../common/execute' ); const buildLocal = require( '../common/buildLocal' ); const gruntCommand = require( '../common/gruntCommand' ); +const createDirectory = require( '../common/createDirectory' ); + +const CHIPPER_DIST = '../chipper/dist'; + /** * This script is meant to ensure that all todos pointing to a github issue are pointing to open issues. @@ -26,6 +30,9 @@ module.exports = async function reopenIssuesFromTODOs() { // with all todo issues. process.env.saveTODOIssues = true; + if ( !fs.existsSync( CHIPPER_DIST ) ) { + await createDirectory( CHIPPER_DIST ); + } fs.writeFileSync( '../chipper/dist/issuesFromTODOs.txt', '' ); console.log( 'grunt lint-everything started' );