unity-azure-pipelines-tasks
                                
                                 unity-azure-pipelines-tasks copied to clipboard
                                
                                    unity-azure-pipelines-tasks copied to clipboard
                            
                            
                            
                        Default Build Command includes non-enabled scenes
In unity-build-script.helper.ts Lines 31-37 when the scenes get added to the list of scenes to build there is no check to see if the scene is enabled.
EditorBuildSettingsScene[] editorConfiguredBuildScenes = EditorBuildSettings.scenes;
string[] includedScenes = new string[editorConfiguredBuildScenes.Length];
                
for (int i = 0; i < editorConfiguredBuildScenes.Length; i++)
{
    includedScenes[i] = editorConfiguredBuildScenes[i].path;
}
Instead it should check if the scene is enabled before adding:
                int enabledSceneCount = 0;
                for (int i = 0; i < editorConfiguredBuildScenes.Length; i++)
                {
                    if (editorConfiguredBuildScenes[i].enabled)
                    {
                        enabledSceneCount++; 
                    }
                }
                string[] includedScenes = new string[enabledSceneCount];
                int j = 0;
                for (int i = 0; i < editorConfiguredBuildScenes.Length; i++)
                {
                    if (editorConfiguredBuildScenes[i].enabled)
                    {
                        includedScenes[j] = editorConfiguredBuildScenes[i].path;
                        j++;
                    }
                }
Thank you, this seems like a trivial fix. I'll put it in the next patch release.