From 5c668c7d4543774cfead95fbcdba83f18a6a6df7 Mon Sep 17 00:00:00 2001 From: Kris De Volder Date: Fri, 2 Mar 2018 13:03:55 -0800 Subject: [PATCH] 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. --- nodejs-packages/jvm-launch-utils/package.json | 5 +---- nodejs-packages/jvm-launch-utils/src/jvm-util.ts | 3 +-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/nodejs-packages/jvm-launch-utils/package.json b/nodejs-packages/jvm-launch-utils/package.json index 9b33b0a42..6c17b7ed3 100644 --- a/nodejs-packages/jvm-launch-utils/package.json +++ b/nodejs-packages/jvm-launch-utils/package.json @@ -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" } } diff --git a/nodejs-packages/jvm-launch-utils/src/jvm-util.ts b/nodejs-packages/jvm-launch-utils/src/jvm-util.ts index 793b27bdc..af838faaa 100644 --- a/nodejs-packages/jvm-launch-utils/src/jvm-util.ts +++ b/nodejs-packages/jvm-launch-utils/src/jvm-util.ts @@ -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);