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

Cannot bind argument to parameter 'exitCode' because it is null #810

Closed
ferventcoder opened this issue Jun 17, 2016 · 1 comment
Closed

Comments

@ferventcoder
Copy link
Member

ferventcoder commented Jun 17, 2016

PowerShell Runner - check $exitCode is not null, if it is, set it to zero.

From #809:

ERROR: Cannot bind argument to parameter 'exitCode' because it is null.
    at System.Management.Automation.ParameterBinderBase.ValidateNullOrEmptyArgument(CommandParameterInternal parameter,
CompiledCommandParameter parameterMetadata, Type argumentType, Object parameterValue, Boolean recurseIntoCollections)
@ferventcoder
Copy link
Member Author

This is a gating issue for some packages.

@ferventcoder ferventcoder changed the title PowerShell Runner - check $exitCode is not null, if it is, set it to zero. PowerShell Runner - check $exitCode is not null, if it is, set it to zero Jun 18, 2016
@ferventcoder ferventcoder changed the title PowerShell Runner - check $exitCode is not null, if it is, set it to zero Cannot bind argument to parameter 'exitCode' because it is null Jun 18, 2016
ferventcoder added a commit that referenced this issue Jun 19, 2016
Ensure exitCode cannot be null. Allow to come in null and then perform
the check. Also don't try to pass an exitCode if one is not set.

~~~sh
ERROR: Cannot bind argument to parameter 'exitCode' because it is null.
    at
System.Management.Automation.ParameterBinderBase.
ValidateNullOrEmptyArgument(CommandParameterInternal
parameter,
CompiledCommandParameter parameterMetadata, Type argumentType, Object
parameterValue, Boolean recurseIntoCollections)
~~~
ferventcoder added a commit that referenced this issue Jun 19, 2016
If the exit code environment variable is not set, set it so choco can
be upgraded successfully.
ferventcoder added a commit that referenced this issue Jun 19, 2016
* stable:
  (version) 0.9.10.2
  (doc) update CHANGELOG/nuspec
  (GH-758) Ensure log path exists
  (GH-813) Fix double chocolatey logging folder
  (GH-813) Shorten Template default log path
  (doc) update default options help messages
  (maint) Don't log creation of folder
  (maint) formatting / add message consistency
  (GH-814) Ensure any version of choco
  (GH-811) Skip resource / licensed assemblies
  (version) 0.9.10.1
  (doc) update CHANGELOG/nuspec
  (GH-810) Install of choco sets exit code
  (GH-812) Upgrade 7zip to 16.02 to address CVEs
  (doc) Note functions Calling Set-PowerShellExitCode
  (GH-810) Fix - Cannot bind parameter exitCode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants