summarylogtreecommitdiffstats
path: root/skip-distro-check.patch
blob: 4ae7eb283bbe810426ede324fae9bdebeec965da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
diff --git a/build.psm1 b/build.psm1
index f528ee821..1e21cf805 100644
--- a/build.psm1
+++ b/build.psm1
@@ -158,6 +158,32 @@ function Get-EnvironmentInformation
     }
 
     if ($environment.IsLinux) {
+        if ($SkipLinuxDistroCheck) {
+            Write-Warning "Skipping distro check entirely."
+
+            $environment += @{'IsDebian' = $false}
+            $environment += @{'IsDebian9' = $false}
+            $environment += @{'IsDebian10' = $false}
+            $environment += @{'IsDebian11' = $false}
+            $environment += @{'IsUbuntu' = $false}
+            $environment += @{'IsUbuntu16' = $false}
+            $environment += @{'IsUbuntu18' = $false}
+            $environment += @{'IsUbuntu20' = $false}
+            $environment += @{'IsCentOS' = $false}
+            $environment += @{'IsFedora' = $false}
+            $environment += @{'IsOpenSUSE' = $false}
+            $environment += @{'IsSLES' = $false}
+            $environment += @{'IsRedHat' = $false}
+            $environment += @{'IsRedHat7' = $false}
+            $environment += @{'IsOpenSUSE13' = $false}
+            $environment += @{'IsOpenSUSE42.1' = $false}
+            $environment += @{'IsDebianFamily' = $false}
+            $environment += @{'IsRedHatFamily' = $false}
+            $environment += @{'IsSUSEFamily' = $false}
+            $environment += @{'IsAlpine' = $false}
+
+            return [PSCustomObject] $environment
+        }
         $LinuxInfo = Get-Content /etc/os-release -Raw | ConvertFrom-StringData
         $lsb_release = Get-Command lsb_release -Type Application -ErrorAction Ignore | Select-Object -First 1
         if ($lsb_release) {