mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-03-20 03:30:55 +03:00
Adds ability to set umask through an environment variable. Does not work on Windows, and it's untested on Linux
This commit is contained in:
@@ -40,6 +40,11 @@ const db = low(adapter)
|
||||
const users_adapter = new FileSync('./appdata/users.json');
|
||||
const users_db = low(users_adapter);
|
||||
|
||||
// env var setup
|
||||
|
||||
const umask = process.env.YTDL_UMASK;
|
||||
if (umask) process.umask(parseInt(umask));
|
||||
|
||||
// check if debug mode
|
||||
let debugMode = process.env.YTDL_MODE === 'debug';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user