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

Extension gives invalid problem: Incorrect type. Expected "boolean" when a boolean parameter is used #360

Closed
myermian opened this issue Oct 9, 2020 · 3 comments
Labels
accurate-yaml-validation Fidelity of matching YAML features Area: VsCodeExtension bug Something isn't working

Comments

@myermian
Copy link

myermian commented Oct 9, 2020

...
parameters:
- name: 'allowconflicts'
  type: boolean
  default: true

steps:
- task: NuGetCommand@2
  displayName: 'NuGet CLI: Push'
  inputs:
    command: push
    allowPackageConflicts: ${{ paramters.allowconflicts }}  <<< Problem: Incorrect type. Expected "boolean".
    ...

My YAML template accepts a parameter named allowconflicts, which is specified as type boolean, but the extension still reports a problem.

Incorrect type. Expected "boolean".

@garfbradaz
Copy link

I get the same issue - for brevity obviously this isnt the full 'yml` :)

- name: publishWebProjects
    type: boolean
    default: true

  - task: DotNetCoreCLI@2
    displayName: Publish project
    inputs:
      command: publish    
      projects: **/*${{ parameters.projectName }}.csproj
      arguments: '--configuration ${{parameters.buildConfiguration}} --output $(Build.ArtifactStagingDirectory)/${{ parameters.artifactName }} --no-build --no-restore'      
      zipAfterPublish: false
      publishWebProjects: ${{ parameters.publishWebProjects }}

@SierraNL
Copy link

This still seems to be an issue:

parameters:
  - name: publishTestResults
    type: boolean
    default: true

steps:
  - task: DotNetCoreCLI@2
    displayName: 'Run tests'
    inputs:
      command: test
      projects: 'my/path/'
      testRunTitle: 'MyTitle'
      publishTestResults: ${{ parameters.publishTestResults }}

For publishTestResults I get a yellow squigly: Incorrect Type Expected "boolean"

@winstliu
Copy link
Member

Looking at this more closely, this is a duplicate of #420.

@winstliu winstliu closed this as not planned Won't fix, can't repro, duplicate, stale Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accurate-yaml-validation Fidelity of matching YAML features Area: VsCodeExtension bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants