From 1de6ec90c625e189efe7e4add5ce8ce5218db8d3 Mon Sep 17 00:00:00 2001 From: "Stephen Weatherford (MSFT)" Date: Wed, 26 Jun 2024 17:17:44 -0700 Subject: [PATCH] Be sure lang-server folder is cleaned when building (#1719) --- gulpfile.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/gulpfile.ts b/gulpfile.ts index bba2651b7..2863f7eb8 100644 --- a/gulpfile.ts +++ b/gulpfile.ts @@ -234,8 +234,8 @@ async function getLanguageServer(): Promise { 'install', languageServerNugetPackage, '-Framework', `net${langServerDotnetVersion}`, - '-OutputDirectory', 'pkgs', - //'-Verbosity', 'detailed', + '-OutputDirectory', pkgsPath, + '-Verbosity', 'detailed', '-ExcludeVersion', // Keeps the package version from being included in the output folder name '-NonInteractive', '-ConfigFile', configPath @@ -251,20 +251,24 @@ async function getLanguageServer(): Promise { args.unshift('nuget.exe'); } const command = `${app} ${args.join(' ')}`; + const languageServerPackageFolderName = path.join(pkgsPath, languageServerNugetPackage); + console.log(`Deleting ${languageServerPackageFolderName}`); + rimraf.sync(languageServerPackageFolderName); executeInShell(command); fse.unlinkSync(configPath); // Copy binaries and license into dist\languageServer - console.log(`Removing ${languageServerFolderName}`); - rimraf.sync(languageServerFolderName); + console.log(`Deleting ${destPath}`); + rimraf.sync(destPath); console.log(`Copying language server binaries to ${languageServerFolderName}`); const langServerSourcePath = path.join(pkgsPath, languageServerNugetPackage, 'lib', `net${langServerDotnetVersion}`); - const licenseSourcePath = path.join(pkgsPath, languageServerNugetPackage, languageServerLicenseFileName); fse.mkdirpSync(destPath); + console.log(` ${langServerSourcePath} -> ${destPath}`); copyFolder(langServerSourcePath, destPath); + const licenseSourcePath = path.join(pkgsPath, languageServerNugetPackage, languageServerLicenseFileName); const licenseDest = path.join(languageServerFolderName, languageServerLicenseFileName); console.log(`Copying language server license ${licenseSourcePath} to ${licenseDest}`); fse.copyFileSync(licenseSourcePath, licenseDest);