From 67c7d8495915f85d5cfcdcc879cf59b97013d3d2 Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Mon, 9 Mar 2026 07:10:37 +0100 Subject: [PATCH] =?UTF-8?q?fix(developer):=20resolve=20input=20project=20p?= =?UTF-8?q?ath=20for=20`kmc=20copy`=20=F0=9F=8D=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Relative paths would cause `kmc copy` to fail to find sources files for the project, because component paths would be constructed incorrectly. The cleanest fix is to ensure that we always full resolve local file paths before attempting to copy the project. Fixes: #15659 Cherry-pick-of: #15700 --- developer/src/kmc-copy/src/KeymanProjectCopier.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/developer/src/kmc-copy/src/KeymanProjectCopier.ts b/developer/src/kmc-copy/src/KeymanProjectCopier.ts index a751e46731..5bdb7c91c1 100644 --- a/developer/src/kmc-copy/src/KeymanProjectCopier.ts +++ b/developer/src/kmc-copy/src/KeymanProjectCopier.ts @@ -185,7 +185,7 @@ export class KeymanProjectCopier implements KeymanCompiler { */ private getLocalFolderProject(source: string): string { source = this.normalizePath(source); - const projectSource = this.normalizePath(this.callbacks.path.join(source, this.callbacks.path.basename(source) + KeymanFileTypes.Source.Project)); + const projectSource = this.normalizePath(this.callbacks.path.resolve(this.callbacks.path.join(source, this.callbacks.path.basename(source) + KeymanFileTypes.Source.Project))); if(!this.callbacks.fs.existsSync(projectSource)) { this.callbacks.reportMessage(CopierMessages.Error_CannotFindInputProject({project: source})); return null; @@ -200,7 +200,7 @@ export class KeymanProjectCopier implements KeymanCompiler { * @returns */ private getLocalFileProject(source: string): string { - return this.normalizePath(source); + return this.normalizePath(this.callbacks.path.resolve(source)); } /**