You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran the file through bunjs and I can't type any letters through the terminal. This is only not working on my ubuntu server. In another server this codes working. This is my codes:
import { ENVLIST } from "@/config/env";
import getRootPath from "@/utils/get-root-path";
import readline from "readline";
import path from "node:path";
What version of Bun is running?
1.1.8+89d25807f
What platform is your computer?
Linux 4.15.0-208-generic x86_64 x86_64
What steps can reproduce the bug?
I ran the file through bunjs and I can't type any letters through the terminal. This is only not working on my ubuntu server. In another server this codes working. This is my codes:
import { ENVLIST } from "@/config/env";
import getRootPath from "@/utils/get-root-path";
import readline from "readline";
import path from "node:path";
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
});
const env = path.join(getRootPath(), ".env");
async function promptAndWriteEnv(index: number) {
if (index < ENV_LIST.length) {
if (!(await Bun.file(env).exists())) await Bun.write(env, "");
} else {
console.log(".env file created successfully!");
rl.close();
}
}
async function checkIfExists(variable: string) {
const envData = await Bun.file(env).text();
const envLines = envData.split("\n");
for (const line of envLines) {
const [key, ] = line.split("=");
if (key.trim() === variable) return true;
}
return false;
}
promptAndWriteEnv(0);
What is the expected behavior?
No response
What do you see instead?
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: