Skip to content

Commit

Permalink
adding a new environment variable DEV_MODE and disabled stack trace i…
Browse files Browse the repository at this point in the history
…f its false

Signed-off-by: Deepak Mishra <[email protected]>
  • Loading branch information
deepak-swirlds committed Nov 14, 2023
1 parent cbabf85 commit 8dd3670
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions fullstack-network-manager/fsnetman.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
#!/usr/bin/env node
import * as fnm from './src/index.mjs'

// Check the value of the DEV_MODE environment variable, ignoring case
const devMode = process.env.DEV_MODE ? process.env.DEV_MODE.toLowerCase() === 'true' : false;

// Disable stack traces if DEV_MODE is false
if (!devMode) {
Error.stackTraceLimit = 0;
}

const cli = fnm.main(process.argv)

0 comments on commit 8dd3670

Please sign in to comment.