Skip to content

Commit 85b1c13

Browse files
authored
Merge pull request #1531 from paulvanbrenk/versionChk
make version check more robust
2 parents 4a490cf + ecf16a3 commit 85b1c13

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

Nodejs/Product/Nodejs/Debugger/NodeDebugger.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public static NodeProcess StartNodeProcessWithInspect(
144144
var debuggerPortOrDefault = debuggerPort ?? GetDebuggerPort();
145145

146146
// Node usage: node [options] [ -e script | script.js ] [arguments]
147-
var allArgs = $"--inspect={debuggerPortOrDefault} --debug-brk --nolazy {interpreterOptions} {script}"; // script includes the arguments for the script, so we can't quote it here
147+
var allArgs = $"--inspect-brk={debuggerPortOrDefault} --nolazy {interpreterOptions} {script}"; // script includes the arguments for the script, so we can't quote it here
148148

149149
return StartNodeProcess(exe, dir, env, debugOptions, debuggerPortOrDefault, allArgs, createNodeWindow);
150150
}

Nodejs/Product/Nodejs/Nodejs.cs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,8 @@ public static Version GetNodeVersion(string path)
3535
{
3636
if (!string.IsNullOrEmpty(path))
3737
{
38-
var versionString = FileVersionInfo.GetVersionInfo(path).ProductVersion;
39-
Version version;
40-
if (Version.TryParse(versionString, out version))
41-
{
42-
return version;
43-
}
38+
var version = FileVersionInfo.GetVersionInfo(path);
39+
return new Version(version.ProductMajorPart, version.ProductMinorPart);
4440
}
4541

4642
return default(Version);

0 commit comments

Comments
 (0)