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

Script tasks #4578

Merged
merged 1 commit into from
Jun 20, 2017
Merged

Script tasks #4578

merged 1 commit into from
Jun 20, 2017

Conversation

ericsciple
Copy link
Contributor

No description provided.

}

# Get inputs.
$input_apartment = Get-VstsInput -Name 'apartment' -Default 'Sta'
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe just hard code 'STA'

Write-Error (Get-VstsLocString -Key 'PS_InvalidErrorActionPreference' -ArgumentList $input_errorActionPreference)
}
}
$input_executionPolicy = Get-VstsInput -Name 'executionPolicy' -Default 'Unrestricted'
Copy link
Contributor

Choose a reason for hiding this comment

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

hard code for now?

Invoke-VstsTool @splat
} else {
$global:ErrorActionPreference = 'Continue'
Invoke-VstsTool @splat 2>&1 |
Copy link
Contributor

Choose a reason for hiding this comment

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

we need ##vso[task.setresult failure];

'FileName' = $powershellPath
'Arguments' = $arguments
'WorkingDirectory' = $workingDirectory
'RequireExitCodeZero' = !$ignoreExitCode
Copy link
Contributor

Choose a reason for hiding this comment

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

input_ignoreExitCode

$splat = @{
'FileName' = $powershellPath
'Arguments' = $arguments
'WorkingDirectory' = $workingDirectory
Copy link
Contributor

Choose a reason for hiding this comment

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

input_workingDirectory

@ericsciple ericsciple force-pushed the users/ersciple/m120script branch 2 times, most recently from 2b7b07d to 10703df Compare June 20, 2017 05:45
@ericsciple
Copy link
Contributor Author

note to self, finished testing win impl

@ericsciple ericsciple force-pushed the users/ersciple/m120script branch from 10703df to 376d0ad Compare June 20, 2017 05:57
@ericsciple ericsciple force-pushed the users/ersciple/m120script branch from 376d0ad to 8c16fea Compare June 20, 2017 06:00
@ericsciple ericsciple merged commit 9123f17 into master Jun 20, 2017
@ericsciple ericsciple deleted the users/ersciple/m120script branch June 20, 2017 14:47
@kzu
Copy link

kzu commented Aug 4, 2017

Heya,
is it intentional that the inline script version does not provide Arguments?

This significantly reduces its usefulness when used in task groups that can automatically discover configurable inputs from arguments used in a script.

image

vs File Path:

image

Reported issue at #4971

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.

4 participants