More quoting. Telemetry and defaults. Exe extension for make on windows. (#154)

This commit is contained in:
Andreea Isac 2021-04-28 15:59:47 -07:00 коммит произвёл GitHub
Родитель a157d1aae0
Коммит 3cbcf7dbdd
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 9 добавлений и 8 удалений

Просмотреть файл

@ -478,13 +478,14 @@ export function getCommandForConfiguration(configuration: string | undefined): v
// Name of the make tool can be defined as makePath in makefile.configurations or as makefile.makePath.
// When none defined, default to "make".
configurationMakeCommand = makeParsedPathConfigurations?.name || makeParsedPathSettings?.name || "make";
configurationMakeCommand = makeParsedPathConfigurations?.base || makeParsedPathSettings?.base || "make";
let configurationMakeCommandExtension: string | undefined = makeParsedPathConfigurations?.ext || makeParsedPathSettings?.ext;
// Prepend the directory path, if defined in either makefile.configurations or makefile.makePath (first has priority).
let configurationCommandPath: string = makeParsedPathConfigurations?.dir || makeParsedPathSettings?.dir || "";
configurationMakeCommand = path.join(configurationCommandPath, configurationMakeCommand);
// Add the ".exe" extension on windows, otherwise the file search APIs don't find it.
if (process.platform === "win32") {
// Add the ".exe" extension on windows if no extension was specified, otherwise the file search APIs don't find it.
if (process.platform === "win32" && configurationMakeCommandExtension === undefined) {
configurationMakeCommand += ".exe";
}

Просмотреть файл

@ -629,12 +629,12 @@ export async function runPreConfigureScript(progress: vscode.Progress<{}>, scrip
let wrapScriptOutFile: string = wrapScriptFile + ".out";
let wrapScriptContent: string;
if (process.platform === "win32") {
wrapScriptContent = `call ${scriptFile}\r\n`;
wrapScriptContent += `set > ${wrapScriptOutFile}`;
wrapScriptContent = `call "${scriptFile}"\r\n`;
wrapScriptContent += `set > "${wrapScriptOutFile}"`;
wrapScriptFile += ".bat";
} else {
wrapScriptContent = `source ${scriptFile}\n`;
wrapScriptContent += `printenv > ${wrapScriptOutFile}`;
wrapScriptContent = `source '${scriptFile}'\n`;
wrapScriptContent += `printenv > '${wrapScriptOutFile}'`;
wrapScriptFile += ".sh";
}

Просмотреть файл

@ -94,7 +94,7 @@ function filterSetting(value: any, key: string, defaultValue: string) : string {
if (!value) {
return "undefined";
} else if (value === defaultValue) {
return defaultValue;
return "default";
}
return "...";