Skip to content

Commit

Permalink
Allow environment variable to override default config (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
cthrax authored and blakeembrey committed May 12, 2016
1 parent 6422205 commit bcf196b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ts-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ const DEFAULT_OPTIONS: Options = {
getVersion,
disableWarnings: process.env.TS_NODE_DISABLE_WARNINGS,
compiler: process.env.TS_NODE_COMPILER,
project: process.env.TS_NODE_PROJECT,
project: process.env.TS_NODE_PROJECT || process.cwd(),
noProject: process.env.TS_NODE_NO_PROJECT,
ignoreWarnings: process.env.TS_NODE_IGNORE_WARNINGS
}
Expand All @@ -130,7 +130,7 @@ const DEFAULT_OPTIONS: Options = {
*/
export function register (opts?: Options) {
const cwd = process.cwd()
const options = extend(DEFAULT_OPTIONS, { project: cwd }, opts)
const options = extend(DEFAULT_OPTIONS, opts)
const project: Project = { version: 0, files: {}, versions: {} }

// Enable compiler overrides.
Expand Down

0 comments on commit bcf196b

Please sign in to comment.