Skip to content

Commit 0b39e8a

Browse files
authored
Merge pull request #81 from graphql-editor/CIFileFix
external-ci/azure-gitlab command: adding protection from empty azureFnName and azureEnv
2 parents c7b3ce4 + a711793 commit 0b39e8a

File tree

1 file changed

+2
-0
lines changed
  • packages/cli/src/commands/externalCi

1 file changed

+2
-0
lines changed

packages/cli/src/commands/externalCi/azure.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export const CommandAzureGitlab = async (props: AzureGitlabCIConf) => {
1414
const DEFAULT_AZURE_CORS =
1515
'https://functions-next.azure.com https://functions-staging.azure.com https://functions.azure.com';
1616
const generateEnvVariables = (names: string) => {
17+
if (!names) return "";
1718
return names
1819
.replace(' ', '')
1920
.split(',')
@@ -29,6 +30,7 @@ const template = ({
2930
azureEnv,
3031
azureCors,
3132
}: Required<AzureGitlabCIConf>) => {
33+
if (!azureFnName) throw new Error('You have to specify unique azureFnName for your resources.')
3234
return `
3335
stages:
3436
- build

0 commit comments

Comments
 (0)