Merge pull request #13 from sammccants/fix_custom_package_dir

Fix issue with finding package.json outside of root
This commit is contained in:
Phil 2020-02-18 11:55:44 +01:00 committed by GitHub
commit b40749255b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -3,7 +3,8 @@ const { execSync } = require('child_process')
// Change working directory if user defined PACKAGEJSON_DIR // Change working directory if user defined PACKAGEJSON_DIR
if (process.env.PACKAGEJSON_DIR) { if (process.env.PACKAGEJSON_DIR) {
process.chdir(`${process.env.GITHUB_WORKSPACE}/${process.env.PACKAGEJSON_DIR}`) process.env.GITHUB_WORKSPACE = `${process.env.GITHUB_WORKSPACE}/${process.env.PACKAGEJSON_DIR}`
process.chdir(process.env.GITHUB_WORKSPACE)
} }
// Run your GitHub Action! // Run your GitHub Action!