More quoting. Telemetry and defaults. Exe extension for make on windows. (#154)
This commit is contained in:
Родитель
a157d1aae0
Коммит
3cbcf7dbdd
|
@ -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 "...";
|
||||
|
|
Загрузка…
Ссылка в новой задаче