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

Print an error message if the packaging properties file doesn't exist #288

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Pipeline/PackageBuildOutputs/PackageBuildOutputs.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,9 @@ def parseInput(String[] cliArgs){
if (propertiesFile.exists()) {
props.packagingPropertiesFile = opts.properties
propertiesFile.withInputStream { props.load(it) }
} else {
println "*! [ERROR] The file '${opts.properties}' doesn't exist."
rc = Math.max(rc, 1)
Copy link
Member

Choose a reason for hiding this comment

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

I think you can directly assign a value to rc, it doesn't hurt to do it this way here.

Suggested change
rc = Math.max(rc, 1)
rc = 2

}
} else { // read default sample properties file shipped with the script
def scriptDir = new File(getClass().protectionDomain.codeSource.location.path).parent
Expand Down Expand Up @@ -981,4 +984,4 @@ def retrieveBuildResultProperty(PropertiesRecord buildResultPropertiesRecord, St
return null
}
}
}
}