@cirocfc/yet-another-github-branch-protection-tool
Advanced tools
Comparing version 0.0.1-alpha.3 to 0.0.1-alpha.4
@@ -6,2 +6,13 @@ # Change Log | ||
## [0.0.1-alpha.4](https://github.com/cirocfc/yet-another/compare/@cirocfc/yet-another-github-branch-protection-tool@0.0.1-alpha.3...@cirocfc/yet-another-github-branch-protection-tool@0.0.1-alpha.4) (2020-10-08) | ||
### Bug Fixes | ||
* read from local env was breaking when using yarn dlx or npx ([3ed6890](https://github.com/cirocfc/yet-another/commit/3ed68902d91c6bc2d05c198aafdf9571a6294129)) | ||
## [0.0.1-alpha.3](https://github.com/cirocfc/yet-another/compare/@cirocfc/yet-another-github-branch-protection-tool@0.0.1-alpha.2...@cirocfc/yet-another-github-branch-protection-tool@0.0.1-alpha.3) (2020-10-08) | ||
@@ -8,0 +19,0 @@ |
@@ -7,7 +7,14 @@ // @ts-check | ||
const localEnv = dotenv.parse(fs.readFileSync(`${getRootPath()}/.env`)); | ||
function getLocalEnv() { | ||
try { | ||
return dotenv.parse(fs.readFileSync(`${getRootPath()}/.env`)); | ||
} catch { | ||
console.warn('.env not found!'); | ||
return {}; | ||
} | ||
} | ||
module.exports = { | ||
GITHUB_TOKEN: process.env.GITHUB_TOKEN, | ||
...localEnv, | ||
...getLocalEnv(), | ||
}; |
@@ -7,3 +7,3 @@ { | ||
}, | ||
"version": "0.0.1-alpha.3", | ||
"version": "0.0.1-alpha.4", | ||
"main": "lib/index.js", | ||
@@ -38,3 +38,3 @@ "bin": { | ||
"license": "MIT", | ||
"gitHead": "6c3f498efa55162bd3a3ef0a846e8add054a0bff" | ||
"gitHead": "560a1abba31754f99be3beafed0f9f6a014c2405" | ||
} |
8010
107