From 0ee7eb338ff504a068b774851a565c74e365c846 Mon Sep 17 00:00:00 2001 From: Penaz Date: Fri, 20 Jan 2023 16:25:59 +0100 Subject: [PATCH 1/2] Ensure Arch Plugin doesn't detect Artix Linux Some Artix Linux Distributions may be "migrated" from Arch and contain the "/etc/arch-release" file, leading to an incorrect OS being detected. --- plugins/hosts/arch/host.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/hosts/arch/host.rb b/plugins/hosts/arch/host.rb index 0384eb25e..01de7c33d 100644 --- a/plugins/hosts/arch/host.rb +++ b/plugins/hosts/arch/host.rb @@ -4,7 +4,7 @@ module VagrantPlugins module HostArch class Host < Vagrant.plugin("2", :host) def detect?(env) - File.exist?("/etc/arch-release") + File.exist?("/etc/arch-release") and not File.exist?("/etc/artix-release") end end end From 157a182ec70bade5ff55a5e0c333d5a8680b9f8b Mon Sep 17 00:00:00 2001 From: Daniele Penazzo Date: Tue, 24 Jan 2023 07:46:24 +0100 Subject: [PATCH 2/2] Update plugins/hosts/arch/host.rb Co-authored-by: Sophia Castellarin --- plugins/hosts/arch/host.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/hosts/arch/host.rb b/plugins/hosts/arch/host.rb index 01de7c33d..ed6339689 100644 --- a/plugins/hosts/arch/host.rb +++ b/plugins/hosts/arch/host.rb @@ -4,7 +4,7 @@ module VagrantPlugins module HostArch class Host < Vagrant.plugin("2", :host) def detect?(env) - File.exist?("/etc/arch-release") and not File.exist?("/etc/artix-release") + File.exist?("/etc/arch-release") && !File.exist?("/etc/artix-release") end end end