Fix jvm-util so jarLaunch works on Windows

Boot properties launher seems to have a bug so it does not properly handle file url encodings if path has spaces.
Fortunately, it works fine if we just pass the path of the file directly without any encoding rather than a proper url.
This commit is contained in:
Kris De Volder
2018-03-02 13:03:55 -08:00
parent 8c3af141cd
commit 5c668c7d45
2 changed files with 2 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@pivotal-tools/jvm-launch-utils",
"version": "0.0.10",
"version": "0.0.11",
"description": "Provides utilities useful for launching Java processes from node packages.",
"files": [
"src",
@@ -30,8 +30,5 @@
"devDependencies": {
"@types/node": "^9.4.6",
"typescript": "^2.7.2"
},
"dependencies": {
"file-url": "^2.0.2"
}
}

View File

@@ -2,7 +2,6 @@ import * as FS from 'fs';
import * as Path from 'path';
import * as ChildProcess from 'child_process';
import { basename } from 'path';
import * as fileUrl from 'file-url';
'use strict';
@@ -209,7 +208,7 @@ class JVMImpl implements JVM {
let args = [];
let toolsJar = this.getToolsJar();
if (toolsJar) {
args.push("-Dloader.path="+fileUrl(toolsJar));
args.push("-Dloader.path="+toolsJar);
}
if (vmargs) {
args.push(...vmargs);