Skip to content

Conversation

ilammy
Copy link
Owner

@ilammy ilammy commented Mar 7, 2021

If the parameters passed to the script are incorrect – for example, architecture is set to something the script does not understand – then the script will print an error message and exit successfully without doing anything useful.

Detect the error messages, forward them to the user, and fail the action. Hopefully, the information from the script will be enough to pinpoint the source of the issue.

For example, if the action is run

with:
  arch: Win32

then the output will be

Found with vswhere: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat
Error: [ERROR:vcvarsall.bat] Invalid argument found : Win32
Error: Could not setup Developer Command Prompt: invalid parameters

which is close enough.

Fixes: #27

If the parameters passed to the script are incorrect -- for example,
architecture is set to something the script does not understand --
then the script will print an error message *and* exit successfully
without doing anything usefult.

Detect the error messages, forward them to the user, and fail the
action. Hopefully, the information from the script will be enough
to pinpoint the source of the issue.

For example, if the action is run

    with:
      arch: Win32

then the output will be

    Found with vswhere: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat
    Error: [ERROR:vcvarsall.bat] Invalid argument found : Win32
    Error: Could not setup Developer Command Prompt: invalid parameters

which is close enough.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Silent failures with invalid arch
1 participant