Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 39b2ef5

Browse files
committed
Read arguments through argv instead of env
1 parent d69e037 commit 39b2ef5

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1414
### Changed
1515
- Improve catching time limit exceeded.
1616
- Change the order of arguments of addNode() in GraphTracer.
17+
- Read arguments through argv instead of env.
1718

1819
## [2.0.5]
1920
### Changed

src/executables/build.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as languages from '/languages';
22
import Promise from 'bluebird';
33
import { exit } from '/common/util';
44

5-
const { LANG } = process.env;
5+
const [, , LANG] = process.argv;
66
if (LANG) {
77
languages[LANG].build().catch(exit);
88
} else {

src/executables/compile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as languages from '/languages';
22
import { exit } from '/common/util';
33

4-
const { LANG, TEMP_PATH } = process.env;
4+
const [, , LANG, TEMP_PATH] = process.argv;
55
languages[LANG].compile(TEMP_PATH).catch(exit);

src/executables/run.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as languages from '/languages';
22
import { exit } from '/common/util';
33

4-
const { LANG, TEMP_PATH } = process.env;
4+
const [, , LANG, TEMP_PATH] = process.argv;
55
languages[LANG].run(TEMP_PATH).catch(exit);

0 commit comments

Comments
 (0)