From 4d56f4368f049d32fb8f4f6371c2b14c530145ab Mon Sep 17 00:00:00 2001 From: Till Date: Mon, 15 Jan 2024 12:08:57 +0100 Subject: [PATCH 1/2] Update types.js Fixing windows path shenanigans --- types.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/types.js b/types.js index 76b92c0..e0b9432 100644 --- a/types.js +++ b/types.js @@ -21,7 +21,10 @@ ProjectContext.prototype.getProjectLocalDirectory = function () { return oldGetProjectLocalDirectory.apply(this, arguments); }; -const remoteCatalogRoot = tropohouse.root; +let remoteCatalogRoot = tropohouse.root; +if (process.platform == "win32") { + remoteCatalogRoot = remoteCatalogRoot.replace(/^\/(\w)\//, "$1:\\").replace(/\//g,'\\'); +} const isLinting = process.argv.includes('lint'); From 79e63a42f8b0fd454be2ae96398861e02a349854 Mon Sep 17 00:00:00 2001 From: ruohki Date: Fri, 9 Feb 2024 23:15:48 +0100 Subject: [PATCH 2/2] Implements more pluginlike aproach --- types.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/types.js b/types.js index e0b9432..adb1d44 100644 --- a/types.js +++ b/types.js @@ -21,10 +21,11 @@ ProjectContext.prototype.getProjectLocalDirectory = function () { return oldGetProjectLocalDirectory.apply(this, arguments); }; -let remoteCatalogRoot = tropohouse.root; -if (process.platform == "win32") { - remoteCatalogRoot = remoteCatalogRoot.replace(/^\/(\w)\//, "$1:\\").replace(/\//g,'\\'); -} +let remoteCatalogRoot = ( + process.platform == "win32" + ) ? + Plugin.convertToOSPath( tropohouse.root ) + : tropohouse.root; const isLinting = process.argv.includes('lint');