MCPcopy Create free account
hub / github.com/Azure/powershell / validateInputs

Function validateInputs

lib/index.js:8678–8689  ·  view source on GitHub ↗
(inlineScript, errorActionPreference)

Source from the content-addressed store, hash-verified

8676 });
8677}
8678function validateInputs(inlineScript, errorActionPreference) {
8679 if (!inlineScript.trim()) {
8680 throw new Error(`inlineScript is empty. Please enter a valid script.`);
8681 }
8682 if (azPSVersion !== "latest") {
8683 if (!Utils_1.default.isValidVersion(azPSVersion)) {
8684 core.info(`Invalid azPSVersion : ${azPSVersion}. Using latest Az Module version.`);
8685 azPSVersion = 'latest';
8686 }
8687 }
8688 validateErrorActionPref(errorActionPreference);
8689}
8690function validateErrorActionPref(errorActionPreference) {
8691 if (!(errorActionPrefValues.has(errorActionPreference.toUpperCase()))) {
8692 throw new Error(`Invalid errorActionPreference: ${errorActionPreference}`);

Callers 1

mainFunction · 0.70

Calls 2

validateErrorActionPrefFunction · 0.70
isValidVersionMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…