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

IncludeDataSource: false seems broken #62

Open
rick-weyrauch-lol opened this issue Jul 13, 2021 · 1 comment
Open

IncludeDataSource: false seems broken #62

rick-weyrauch-lol opened this issue Jul 13, 2021 · 1 comment

Comments

@rick-weyrauch-lol
Copy link

I am not sure how "IncludeDataSource: false" is able to work for anyone. I am not a PowerShell expert, but when I look at this if:

if($IncludeDataSource -eq $true)

... it's not right since $IncludeDataSource is a string in the PS:

[string]$IncludeDataSource,

... and so both 'false' and 'true' -eq to $true, and causes the run to display this error (which actually makes sense based on the Write-Error code inside the if):

Uploading files
##[error]Microsoft.PowerShell.Commands.WriteErrorException: No file(s) matching the path/wildcard False were found
##[error]PowerShell script completed with 1 errors.
##########################################################
#                      Testing files                     #
##########################################################

	Write-Host "Uploading files" -NoNewline;
	#Get all Files using the $ReportFiles parameter (expecting it is a Wildcard or direct link to 1 file)
	$pathIsValid = Test-Path $ReportFiles;
	if($pathIsValid -eq $False){
		Write-Error "No file(s) matching the path/wildcard $ReportFiles were found";#NotFound 1
		exit -1;
	}

	if($IncludeDataSource -eq $true){
		$pathRdsIsValid = Test-Path $DataSourceLocalPath;
		if($pathRdsIsValid -eq $false){
			Write-Error "No file(s) matching the path/wildcard $pathRdsIsValid were found";#NotFound 1
			exit -1;
		}
	}

I need to be able to run without deploying Data Sources - any chance that can get fixed? Is this tool still being maintained?

@rick-weyrauch-lol
Copy link
Author

On a side note - I also do not understand why having no files that match the pattern needs to be a fatal error - if I forget to deploy any matching files, then there is simply nothing for that section to do. The code could output a Warning I guess, but there should be nothing wrong with an empty file list. One could easily have conditional deployment steps that under unique circumstance renders no files... but then the tool would blow up the run.

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

No branches or pull requests

1 participant