mirror of
https://github.com/HeyPuter/puter.git
synced 2026-01-06 13:10:24 -06:00
feat: add optional dotenv support
This adds an optional import for 'dotenv'. If dotenv is installed via npm then the .env file will be loaded.
This commit is contained in:
@@ -26,6 +26,13 @@
|
||||
import console from 'node:console';
|
||||
import process from 'node:process';
|
||||
|
||||
try {
|
||||
const dotenv = require('dotenv');
|
||||
dotenv.config();
|
||||
} catch (e) {
|
||||
// dotenv is optional
|
||||
}
|
||||
|
||||
const surrounding_box = (col, lines) => {
|
||||
const lengths = lines.map(line => line.length);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user