Skip to content

Commit 9715925

Browse files
committed
Consistently use "\n" to split lines, then trim extra characters if needed
1 parent 44a4bea commit 9715925

File tree

2 files changed

+30
-32
lines changed

2 files changed

+30
-32
lines changed

lib/start-proxy-action.js

Lines changed: 28 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/start-proxy/environment.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import * as fs from "fs";
2-
import * as os from "os";
32
import * as path from "path";
43

54
import { JavaEnvVars, KnownLanguage, Language } from "../languages";
@@ -101,11 +100,11 @@ export function checkJdkSettings(logger: Logger, jdkHome: string) {
101100
if (fs.existsSync(file)) {
102101
logger.debug(`Found '${file}'.`);
103102

104-
const lines = String(fs.readFileSync(file)).split(os.EOL);
103+
const lines = String(fs.readFileSync(file)).split("\n");
105104
for (const line of lines) {
106105
for (const property of properties) {
107106
if (line.startsWith(`${property}=`)) {
108-
logger.info(`Found '${line}' in '${file}'.`);
107+
logger.info(`Found '${line.trimEnd()}' in '${file}'.`);
109108
}
110109
}
111110
}

0 commit comments

Comments
 (0)