Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

process.env.DEBUG ignored in Electron apps for all cases #431

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/browser.js
Expand Up @@ -148,14 +148,17 @@ function save(namespaces) {
*/

function load() {
var r;
try {
return exports.storage.debug;
r = exports.storage.debug;
} catch(e) {}

// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
if (typeof process !== 'undefined' && 'env' in process) {
return process.env.DEBUG;
if (!r && typeof process !== 'undefined' && 'env' in process) {
r = process.env.DEBUG;
}

return r;
}

/**
Expand Down