Compare commits
No commits in common. "ef155d7eecbb94ca23783e5c4c6d9192bb672e03" and "960359e1e0fdcb9e9a92d519ad36bed5dfcebd30" have entirely different histories.
ef155d7eec
...
960359e1e0
18
ngenv
18
ngenv
|
@ -39,7 +39,7 @@ function getOptions() {
|
|||
if (options.verbose) console.log("Options:", options);
|
||||
|
||||
// Find the .env file
|
||||
const dotEnvFile = options?.env ?? findDotEnv(".env");
|
||||
const dotEnvFile = findDotEnv(options?.env ?? ".env");
|
||||
if (!dotEnvFile) {
|
||||
console.error(
|
||||
`The specified environment file was not found: ${options?.env ?? ".env"}`
|
||||
|
@ -113,20 +113,20 @@ function readNgrokConfig() {
|
|||
}
|
||||
|
||||
// Setup the ngenv folder
|
||||
const tmpFolder = os.tmpdir();
|
||||
if (!tmpFolder) {
|
||||
const projectFolder = findProjectFolder(options?.env ?? ".env");
|
||||
if (!projectFolder) {
|
||||
console.error(
|
||||
"No project folder found! Make sure there is a .env file in the project folder."
|
||||
);
|
||||
process.exit(1);
|
||||
}
|
||||
if (options.verbose) console.log(`Using project folder: ${tmpFolder}`);
|
||||
if (!fs.existsSync(`${tmpFolder}/.ngenv`)) {
|
||||
fs.mkdirSync(`${tmpFolder}/.ngenv`);
|
||||
if (options.verbose) console.log(`Using project folder: ${projectFolder}`);
|
||||
if (!fs.existsSync(`${projectFolder}/.ngenv`)) {
|
||||
fs.mkdirSync(`${projectFolder}/.ngenv`);
|
||||
}
|
||||
const lockFile = `${tmpFolder}/.ngenv/running.lock`;
|
||||
const outLogFile = `${tmpFolder}/.ngenv/out.log`;
|
||||
const errLogFile = `${tmpFolder}/.ngenv/err.log`;
|
||||
const lockFile = `${projectFolder}/.ngenv/running.lock`;
|
||||
const outLogFile = `${projectFolder}/.ngenv/out.log`;
|
||||
const errLogFile = `${projectFolder}/.ngenv/err.log`;
|
||||
|
||||
/******************************************* Startup *******************************************/
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "ngenv",
|
||||
"version": "2.0.4",
|
||||
"version": "2.0.3",
|
||||
"description": "Writes ngrok tunnel url to .env file",
|
||||
"main": "ngenv",
|
||||
"license": "MIT",
|
||||
|
|
Loading…
Reference in New Issue