allow for input or environment
This commit is contained in:
parent
04b79be048
commit
1568b67ba5
5
index.js
5
index.js
|
@ -5,7 +5,10 @@ const { EOL } = require('os');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
|
||||||
// Change working directory if user defined PACKAGEJSON_DIR
|
// Change working directory if user defined PACKAGEJSON_DIR
|
||||||
if (process.env.INPUT_PACKAGEJSON_DIR) {
|
if (process.env.PACKAGEJSON_DIR) {
|
||||||
|
process.env.GITHUB_WORKSPACE = `${process.env.GITHUB_WORKSPACE}/${process.env.PACKAGEJSON_DIR}`;
|
||||||
|
process.chdir(process.env.GITHUB_WORKSPACE);
|
||||||
|
} else if (process.env.INPUT_PACKAGEJSON_DIR) {
|
||||||
process.env.GITHUB_WORKSPACE = `${process.env.GITHUB_WORKSPACE}/${process.env.INPUT_PACKAGEJSON_DIR}`;
|
process.env.GITHUB_WORKSPACE = `${process.env.GITHUB_WORKSPACE}/${process.env.INPUT_PACKAGEJSON_DIR}`;
|
||||||
process.chdir(process.env.GITHUB_WORKSPACE);
|
process.chdir(process.env.GITHUB_WORKSPACE);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue