Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not care about the bat call result #1403

Merged
merged 2 commits into from
Oct 12, 2020
Merged

Conversation

lygstate
Copy link
Contributor

@lygstate lygstate commented Aug 7, 2020

Thirdparty software would cause
call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" x86
to be called but with error code
and the env are still set properly.
The following are the execute result:

configuration might not be installed.

C:\Users\大乖>call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" x86
'MySQL' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
'MySQL' 不是内部或外部命令,也不是可运行的程序
或批处理文件。

This change addresses item #[[put issue number here to generate a link]]

This changes [[visible behavior/performance/documentation/etc.]]

The following changes are proposed:

The purpose of this change

Other Notes/Information

src/kit.ts Outdated Show resolved Hide resolved
@bobbrow bobbrow added this to the 1.5.0 milestone Aug 21, 2020
@lygstate
Copy link
Contributor Author

ping

src/kit.ts Show resolved Hide resolved
src/kit.ts Outdated
@@ -539,7 +540,8 @@ async function collectDevBatVars(devbat: string, args: string[], major_version:
try {
await fs.unlink(envpath);
} catch (error) {}
await fs.writeFile(batpath, bat.join('\r\n'));
const batContent = bat.join('\r\n');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: batContent can be set one line earlier, then fs.writeFile can use batContent as second parameter.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't understand, batContent used latter

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see it now but I thought I saw twice the following: bat.join('\r\n').

src/kit.ts Outdated
Comment on lines 571 to 578
if (vars.get('INCLUDE') === '') {
console.log(`Error running ${devbat} ${args.join(' ')}, cannot find INCLUDE`);
log.error(localize('script.run.error', 'Error running:\n{0}\nWith args:\n{1}, cannot find INCLUDE with {2}', batContent, args.join(' '), env));
return;
}
Copy link
Contributor

@andreeis andreeis Oct 8, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how readable that message is, because it has very long parts.
I'm thinking that we still need devbat in the message, as it were before, then being followed by the args. Right now, the args are coming after the devbat content.
Then, printing batContent and env is still useful, but part of a different message phrase.

@bobbrow bobbrow modified the milestones: 1.6.0, 1.5.0 Oct 8, 2020
@lygstate lygstate force-pushed the msvc-detect branch 2 times, most recently from 313f500 to ae2d9f1 Compare October 8, 2020 18:23
Thirdparty software would cause
call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" x86
to be called but with error code
and the env are still set properly.
The following are the execute result:
```
configuration might not be installed.

C:\Users\大乖>call "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat" x86
'MySQL' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
'MySQL' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
```
@andreeis andreeis merged commit 50445c9 into microsoft:develop Oct 12, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jan 29, 2022
@lygstate lygstate deleted the msvc-detect branch February 8, 2022 08:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants