diff --git a/.gitignore b/.gitignore index 2d8c216..f69a42b 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,5 @@ features/src/**/installer_* # Cache for prepared and cleaned feature for packaging/publishing .prepared-feature/ + +.devcontainer/devcontainer-lock.json diff --git a/features/src/dotnet/README.md b/features/src/dotnet/README.md index 492a470..2d2797e 100755 --- a/features/src/dotnet/README.md +++ b/features/src/dotnet/README.md @@ -6,7 +6,7 @@ A package which installs .NET SDKs, runtimes and workloads. ```json "features": { - "ghcr.io/postfinance/devcontainer-features/dotnet:1.0.0": { + "ghcr.io/postfinance/devcontainer-features/dotnet:1.0.1": { "version": "10.0", "additionalVersions": "", "dotnetRuntimeVersions": "", diff --git a/features/src/dotnet/devcontainer-feature.json b/features/src/dotnet/devcontainer-feature.json index d31055b..77fa61e 100644 --- a/features/src/dotnet/devcontainer-feature.json +++ b/features/src/dotnet/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "dotnet", - "version": "1.0.0", + "version": "1.0.1", "name": ".NET", "description": "A package which installs .NET SDKs, runtimes and workloads.", "options": { @@ -84,4 +84,4 @@ "DOTNET_USE_POLLING_FILE_WATCHER": "true", "DOTNET_CLI_TELEMETRY_OPTOUT": "1" } -} \ No newline at end of file +} diff --git a/features/src/kubectl/README.md b/features/src/kubectl/README.md index f3ada69..c816494 100755 --- a/features/src/kubectl/README.md +++ b/features/src/kubectl/README.md @@ -6,7 +6,7 @@ Installs kubectl and other tools for managing kubernetes. ```json "features": { - "ghcr.io/postfinance/devcontainer-features/kubectl:1.1.0": { + "ghcr.io/postfinance/devcontainer-features/kubectl:1.1.1": { "version": "latest", "kubectxVersion": "latest", "kubensVersion": "latest", diff --git a/features/src/kubectl/devcontainer-feature.json b/features/src/kubectl/devcontainer-feature.json index 6c4c3f0..de545ca 100644 --- a/features/src/kubectl/devcontainer-feature.json +++ b/features/src/kubectl/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "kubectl", - "version": "1.1.0", + "version": "1.1.1", "name": "kubectl", "description": "Installs kubectl and other tools for managing kubernetes.", "options": { @@ -131,4 +131,4 @@ "description": "The download URL to use for kube-score binaries." } } -} \ No newline at end of file +} diff --git a/features/src/python/README.md b/features/src/python/README.md index 4e8b0c3..397e653 100755 --- a/features/src/python/README.md +++ b/features/src/python/README.md @@ -6,7 +6,7 @@ Installs Python. ```json "features": { - "ghcr.io/postfinance/devcontainer-features/python:1.2.0": { + "ghcr.io/postfinance/devcontainer-features/python:1.2.1": { "version": "latest", "downloadUrl": "", "pipIndex": "", diff --git a/features/src/python/devcontainer-feature.json b/features/src/python/devcontainer-feature.json index 6c7950c..283e201 100644 --- a/features/src/python/devcontainer-feature.json +++ b/features/src/python/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "python", - "version": "1.2.0", + "version": "1.2.1", "name": "Python", "description": "Installs Python.", "options": { diff --git a/features/src/system-packages/README.md b/features/src/system-packages/README.md index a9738ed..3d2e20d 100755 --- a/features/src/system-packages/README.md +++ b/features/src/system-packages/README.md @@ -6,7 +6,7 @@ Install arbitrary system packages using the system package manager. ```json "features": { - "ghcr.io/postfinance/devcontainer-features/system-packages:1.0.0": { + "ghcr.io/postfinance/devcontainer-features/system-packages:1.0.1": { "packages": "" } } diff --git a/features/src/system-packages/devcontainer-feature.json b/features/src/system-packages/devcontainer-feature.json index 740e47a..761bda5 100644 --- a/features/src/system-packages/devcontainer-feature.json +++ b/features/src/system-packages/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "system-packages", - "version": "1.0.0", + "version": "1.0.1", "name": "System Packages", "description": "Install arbitrary system packages using the system package manager.", "options": { @@ -14,4 +14,4 @@ "default": "" } } -} \ No newline at end of file +} diff --git a/installer/system.go b/installer/system.go index 4450ba0..6e9612f 100644 --- a/installer/system.go +++ b/installer/system.go @@ -107,17 +107,19 @@ func (s *system) OsInfo() *OsInfo { if err := scanner.Err(); err != nil { return } + // We do not know which values are provided by the OS, so we take what + // we can get and set undefined values to "unknown" vendor, ok := infoMap["ID"] if !ok { - return + vendor = "unknown" } codename, ok := infoMap["VERSION_CODENAME"] if !ok { - return + codename = "unknown" } versionId, ok := infoMap["VERSION_ID"] if !ok { - return + versionId = "unknown" } s.osInfo = &OsInfo{ Vendor: vendor, @@ -125,10 +127,6 @@ func (s *system) OsInfo() *OsInfo { VersionId: versionId, } }) - if s.osInfo == nil { - // Fill with unknown if we couldn't read the OS info - s.osInfo = &OsInfo{Vendor: "unknown", Codename: "unknown", VersionId: "unknown"} - } return s.osInfo }