TS: Simplify debugging

This commit is contained in:
Asger F
2019-11-15 14:23:27 +00:00
parent 8205a59688
commit 23f8d27447
2 changed files with 5 additions and 4 deletions

View File

@@ -8,7 +8,8 @@
"build": "tsc --project tsconfig.json",
"check": "tsc --noEmit --project . && tslint --project .",
"lint": "tslint --project .",
"lint-fix": "tslint --project . --fix"
"lint-fix": "tslint --project . --fix",
"watch": "tsc -p . -w --sourceMap"
},
"devDependencies": {
"@types/node": "12.7.11",

View File

@@ -291,10 +291,10 @@ public class TypeScriptParser {
LogbackUtils.getLogger(AbstractProcessBuilder.class).setLevel(Level.INFO);
String explicitPath = Env.systemEnv().get(PARSER_WRAPPER_PATH_ENV_VAR);
String semmleDistVar = Env.systemEnv().get(Env.Var.SEMMLE_DIST.name());
if (semmleDistVar != null && !semmleDistVar.isEmpty()) {
parserWrapper = new File(semmleDistVar, "tools/typescript-parser-wrapper/main.js");
} else if (explicitPath != null) {
if (explicitPath != null) {
parserWrapper = new File(explicitPath);
} else if (semmleDistVar != null && !semmleDistVar.isEmpty()) {
parserWrapper = new File(semmleDistVar, "tools/typescript-parser-wrapper/main.js");
} else {
throw new CatastrophicError(
"Could not find TypeScript parser: " + Env.Var.SEMMLE_DIST.name() + " is not set.");